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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: B = None
        self.x: D = None
        self.v: B = None
        self.txt = txt

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

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

e = A("e")
k = B("k")
l = C("l")
g = D("g")
a = B("a")
c = B("c")
f = C("f")

e.t = g
e.q = f
e.u = f
e.o = c
k.r = f
k.u = c
k.v = c
k.x = g
l.u = f
l.v = g
g.w = e
g.p = e
g.z = k
a.r = f
a.u = c
a.v = c
a.x = g
c.r = f
c.u = a
c.v = a
c.x = g
f.u = l
f.v = g
assert c.r.u.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: C = None
        self.u: C = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: B = None
        self.x: D = None
        self.v: B = None
        self.txt = txt

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

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

e = A("e")
k = B("k")
l = C("l")
g = D("g")
a = B("a")
c = B("c")
f = C("f")

e.t = g
e.q = f
e.u = f
e.o = c
k.r = f
k.u = c
k.v = c
k.x = g
l.u = f
l.v = g
g.w = e
g.p = e
g.z = k
a.r = f
a.u = c
a.v = c
a.x = g
c.r = f
c.u = a
c.v = a
c.x = g
f.u = l
f.v = g
assert c.r.u.u.u.txt == "l"