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

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

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

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

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

k = A("k")
d = B("d")
m = C("m")
j = D("j")
a = E("a")
l = B("l")

k.t = m
k.q = m
k.s = l
k.v = d
d.y = a
d.z = m
m.q = j
m.p = j
m.r = d
m.x = a
m.u = a
j.v = d
j.p = k
j.o = a
a.y = l
a.q = m
a.x = m
a.p = m
l.y = a
l.z = m
assert a.y.z.r.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: C = None
        self.s: B = None
        self.v: B = None
        self.txt = txt

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

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

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

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

k = A("k")
d = B("d")
m = C("m")
j = D("j")
a = E("a")
l = B("l")

k.t = m
k.q = m
k.s = l
k.v = d
d.y = a
d.z = m
m.q = j
m.p = j
m.r = d
m.x = a
m.u = a
j.v = d
j.p = k
j.o = a
a.y = l
a.q = m
a.x = m
a.p = m
l.y = a
l.z = m
assert a.y.z.r.txt == "d"