class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: C = None
        self.r: F = None
        self.z: D = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: C = None
        self.r: F = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: E = None
        self.v: C = None
        self.q: B = None
        self.u: B = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: G = None
        self.q: C = None
        self.v: D = None
        self.u: G = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

i = A("i")
m = B("m")
a = C("a")
e = D("e")
c = E("c")
j = F("j")
l = G("l")
k = C("k")
g = E("g")
b = A("b")

i.t = l
i.o = e
m.p = b
m.q = b
m.u = k
m.r = j
m.z = e
a.q = e
a.o = k
a.r = j
a.p = i
e.y = m
e.q = m
e.u = m
e.x = m
e.s = c
e.v = a
c.s = m
c.p = a
j.o = l
j.r = l
j.u = l
j.q = a
j.p = a
j.v = e
l.w = j
k.q = e
k.o = a
k.r = j
k.p = i
g.s = m
g.p = k
b.t = l
b.o = e
assert j.v.s.s.r.r.w.r.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: C = None
        self.r: F = None
        self.z: D = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: C = None
        self.r: F = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: E = None
        self.v: C = None
        self.q: B = None
        self.u: B = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: G = None
        self.q: C = None
        self.v: D = None
        self.u: G = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

i = A("i")
m = B("m")
a = C("a")
e = D("e")
c = E("c")
j = F("j")
l = G("l")
k = C("k")
g = E("g")
b = A("b")

i.t = l
i.o = e
m.p = b
m.q = b
m.u = k
m.r = j
m.z = e
a.q = e
a.o = k
a.r = j
a.p = i
e.y = m
e.q = m
e.u = m
e.x = m
e.s = c
e.v = a
c.s = m
c.p = a
j.o = l
j.r = l
j.u = l
j.q = a
j.p = a
j.v = e
l.w = j
k.q = e
k.o = a
k.r = j
k.p = i
g.s = m
g.p = k
b.t = l
b.o = e
assert j.v.s.s.r.r.w.r.w.txt == "j"