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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: D = None
        self.q: A = None
        self.r: B = None
        self.txt = txt

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

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

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

i = A("i")
d = B("d")
b = C("b")
k = D("k")
e = E("e")
c = B("c")
l = E("l")

i.p = c
i.z = c
i.x = l
d.x = k
d.y = k
d.q = i
d.r = c
b.y = k
k.s = i
k.o = i
e.t = b
e.z = k
e.x = k
e.r = l
e.u = l
c.x = k
c.y = k
c.q = i
c.r = d
l.t = b
l.z = k
l.x = k
l.r = e
l.u = e
assert l.t.y.s.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: B = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: D = None
        self.q: A = None
        self.r: B = None
        self.txt = txt

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

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

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

i = A("i")
d = B("d")
b = C("b")
k = D("k")
e = E("e")
c = B("c")
l = E("l")

i.p = c
i.z = c
i.x = l
d.x = k
d.y = k
d.q = i
d.r = c
b.y = k
k.s = i
k.o = i
e.t = b
e.z = k
e.x = k
e.r = l
e.u = l
c.x = k
c.y = k
c.q = i
c.r = d
l.t = b
l.z = k
l.x = k
l.r = e
l.u = e
assert l.t.y.s.x.u.txt == "e"