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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: C = None
        self.v: C = None
        self.txt = txt

e = A("e")
d = B("d")
a = C("a")
c = D("c")
i = D("i")
m = A("m")
n = A("n")
g = B("g")
f = C("f")
k = B("k")

e.t = a
e.s = f
d.u = m
a.q = f
a.u = f
a.z = f
a.y = g
c.t = k
c.s = a
c.v = f
i.t = k
i.s = f
i.v = f
m.t = f
m.s = f
n.t = a
n.s = a
g.u = m
f.q = a
f.u = a
f.z = a
f.y = g
k.u = m
assert m.t.y.u.t.y.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: C = None
        self.v: C = None
        self.txt = txt

e = A("e")
d = B("d")
a = C("a")
c = D("c")
i = D("i")
m = A("m")
n = A("n")
g = B("g")
f = C("f")
k = B("k")

e.t = a
e.s = f
d.u = m
a.q = f
a.u = f
a.z = f
a.y = g
c.t = k
c.s = a
c.v = f
i.t = k
i.s = f
i.v = f
m.t = f
m.s = f
n.t = a
n.s = a
g.u = m
f.q = a
f.u = a
f.z = a
f.y = g
k.u = m
assert m.t.y.u.t.y.u.txt == "m"