class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: E = None
        self.y: E = None
        self.s: A = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: E = None
        self.y: E = None
        self.s: A = None
        self.p: E = None
        self.txt = txt

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

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

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