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

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

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

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

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

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

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

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

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

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

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

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

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