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

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

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: C = None
        self.u: E = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: C = None
        self.u: E = None
        self.t: E = None
        self.txt = txt

k = A("k")
d = B("d")
j = C("j")
i = D("i")
e = E("e")
b = D("b")
a = C("a")
n = D("n")
f = E("f")
l = C("l")

k.r = d
k.z = d
k.s = a
k.w = e
k.x = i
d.q = l
j.o = a
j.r = a
j.u = f
j.q = e
i.t = k
e.o = f
e.u = f
e.t = f
e.w = j
b.t = k
a.o = l
a.r = l
a.u = e
a.q = e
n.t = k
f.o = e
f.u = e
f.t = e
f.w = l
l.o = j
l.r = a
l.u = f
l.q = f
assert j.r.r.q.t.t.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: C = None
        self.z: B = None
        self.w: E = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: C = None
        self.u: E = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: C = None
        self.u: E = None
        self.t: E = None
        self.txt = txt

k = A("k")
d = B("d")
j = C("j")
i = D("i")
e = E("e")
b = D("b")
a = C("a")
n = D("n")
f = E("f")
l = C("l")

k.r = d
k.z = d
k.s = a
k.w = e
k.x = i
d.q = l
j.o = a
j.r = a
j.u = f
j.q = e
i.t = k
e.o = f
e.u = f
e.t = f
e.w = j
b.t = k
a.o = l
a.r = l
a.u = e
a.q = e
n.t = k
f.o = e
f.u = e
f.t = e
f.w = l
l.o = j
l.r = a
l.u = f
l.q = f
assert j.r.r.q.t.t.t.t.txt == "f"