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

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

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

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

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

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

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

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

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

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

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

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

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