class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: B = None
        self.x: A = None
        self.v: E = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: B = None
        self.r: A = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.p: F = None
        self.t: B = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: C = None
        self.t: D = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: C = None
        self.t: D = None
        self.r: B = None
        self.txt = txt

g = A("g")
b = B("b")
c = C("c")
m = D("m")
j = E("j")
e = F("e")
d = B("d")
f = F("f")
l = A("l")

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: B = None
        self.r: A = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.p: F = None
        self.t: B = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: C = None
        self.t: D = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: C = None
        self.t: D = None
        self.r: B = None
        self.txt = txt

g = A("g")
b = B("b")
c = C("c")
m = D("m")
j = E("j")
e = F("e")
d = B("d")
f = F("f")
l = A("l")

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