class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: D = None
        self.t: C = None
        self.u: C = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: A = None
        self.q: D = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: B = None
        self.w: C = None
        self.p: D = None
        self.txt = txt

e = A("e")
b = B("b")
m = C("m")
f = D("f")
g = E("g")
a = A("a")
d = D("d")
k = C("k")
j = E("j")

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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: A = None
        self.q: D = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: B = None
        self.w: C = None
        self.p: D = None
        self.txt = txt

e = A("e")
b = B("b")
m = C("m")
f = D("f")
g = E("g")
a = A("a")
d = D("d")
k = C("k")
j = E("j")

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