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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.q: D = None
        self.s: E = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.q: D = None
        self.s: E = None
        self.w: C = None
        self.txt = txt

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

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