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

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

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

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

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

i = A("i")
a = B("a")
e = C("e")
b = D("b")
l = E("l")
f = C("f")

i.p = f
a.u = b
e.z = a
e.t = b
e.r = b
e.u = l
e.p = l
b.o = f
b.x = a
b.t = a
b.u = a
b.y = i
l.t = b
l.p = a
l.z = i
f.z = a
f.t = b
f.r = b
f.u = l
f.p = l
assert f.r.u.u.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

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

i = A("i")
a = B("a")
e = C("e")
b = D("b")
l = E("l")
f = C("f")

i.p = f
a.u = b
e.z = a
e.t = b
e.r = b
e.u = l
e.p = l
b.o = f
b.x = a
b.t = a
b.u = a
b.y = i
l.t = b
l.p = a
l.z = i
f.z = a
f.t = b
f.r = b
f.u = l
f.p = l
assert f.r.u.u.t.u.txt == "b"