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

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

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

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

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

i = A("i")
h = B("h")
k = C("k")
j = D("j")
c = E("c")
f = A("f")
m = D("m")
a = B("a")
e = E("e")

i.o = j
i.u = e
i.z = e
h.x = e
h.o = c
h.z = a
k.u = m
j.v = m
c.r = f
c.z = k
c.x = e
c.s = a
c.t = j
f.o = j
f.u = e
f.z = e
m.v = j
a.x = c
a.o = c
a.z = h
e.r = i
e.z = k
e.x = c
e.s = h
e.t = m
assert a.o.t.v.v.v.v.v.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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

i = A("i")
h = B("h")
k = C("k")
j = D("j")
c = E("c")
f = A("f")
m = D("m")
a = B("a")
e = E("e")

i.o = j
i.u = e
i.z = e
h.x = e
h.o = c
h.z = a
k.u = m
j.v = m
c.r = f
c.z = k
c.x = e
c.s = a
c.t = j
f.o = j
f.u = e
f.z = e
m.v = j
a.x = c
a.o = c
a.z = h
e.r = i
e.z = k
e.x = c
e.s = h
e.t = m
assert a.o.t.v.v.v.v.v.v.v.txt == "m"