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

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

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

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

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

i = A("i")
l = B("l")
e = C("e")
n = D("n")
b = E("b")
f = A("f")
m = E("m")
c = E("c")
d = C("d")

i.z = m
l.v = b
l.x = m
l.p = f
e.y = i
e.t = d
e.z = l
e.p = m
e.o = c
n.t = e
n.o = e
n.r = i
b.z = l
f.z = b
m.z = l
c.z = l
d.y = f
d.t = e
d.z = l
d.p = b
d.o = m
assert e.y.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

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

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

i = A("i")
l = B("l")
e = C("e")
n = D("n")
b = E("b")
f = A("f")
m = E("m")
c = E("c")
d = C("d")

i.z = m
l.v = b
l.x = m
l.p = f
e.y = i
e.t = d
e.z = l
e.p = m
e.o = c
n.t = e
n.o = e
n.r = i
b.z = l
f.z = b
m.z = l
c.z = l
d.y = f
d.t = e
d.z = l
d.p = b
d.o = m
assert e.y.z.z.txt == "l"