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

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

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

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

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

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

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

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

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

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

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

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

i.z = m
i.x = a
i.p = l
d.v = k
d.o = k
k.v = d
k.s = b
k.y = b
k.o = i
b.x = k
b.u = d
b.o = d
b.t = m
a.w = e
a.z = i
a.q = b
f.w = e
f.z = i
f.q = m
e.w = f
e.z = i
e.q = b
l.v = k
l.o = k
m.x = k
m.u = d
m.o = d
m.t = b
assert m.x.y.t.o.o.txt == "k"