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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: B = None
        self.z: C = None
        self.p: D = None
        self.txt = txt

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

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

i = A("i")
a = B("a")
e = C("e")
m = D("m")
d = A("d")
j = B("j")
b = D("b")
l = C("l")

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: B = None
        self.z: C = None
        self.p: D = None
        self.txt = txt

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

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

i = A("i")
a = B("a")
e = C("e")
m = D("m")
d = A("d")
j = B("j")
b = D("b")
l = C("l")

i.o = a
i.v = d
i.z = d
i.r = j
a.w = d
a.s = j
a.z = e
a.p = m
e.v = i
e.x = l
e.t = b
m.u = a
d.o = a
d.v = i
d.z = i
d.r = j
j.w = d
j.s = a
j.z = l
j.p = m
b.u = j
l.v = d
l.x = e
l.t = b
assert m.u.p.u.s.txt == "j"