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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: D = None
        self.txt = txt

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

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

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

j = A("j")
g = B("g")
c = C("c")
d = D("d")
h = E("h")
b = C("b")
a = E("a")
e = B("e")
n = A("n")

j.t = c
j.y = d
j.o = h
g.z = h
g.y = d
c.t = e
c.z = d
c.y = d
c.u = b
d.s = a
h.u = a
h.w = d
b.t = g
b.z = d
b.y = d
b.u = c
a.u = h
a.w = d
e.z = a
e.y = d
n.t = b
n.y = d
n.o = a
assert c.z.s.u.u.u.u.w.s.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: D = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: D = None
        self.txt = txt

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

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

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

j = A("j")
g = B("g")
c = C("c")
d = D("d")
h = E("h")
b = C("b")
a = E("a")
e = B("e")
n = A("n")

j.t = c
j.y = d
j.o = h
g.z = h
g.y = d
c.t = e
c.z = d
c.y = d
c.u = b
d.s = a
h.u = a
h.w = d
b.t = g
b.z = d
b.y = d
b.u = c
a.u = h
a.w = d
e.z = a
e.y = d
n.t = b
n.y = d
n.o = a
assert c.z.s.u.u.u.u.w.s.u.txt == "h"