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

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

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

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

h = A("h")
i = B("i")
f = C("f")
n = D("n")
b = B("b")
e = C("e")
g = A("g")
l = D("l")
a = C("a")

h.x = b
i.y = l
f.o = b
f.q = l
f.v = l
f.t = l
n.s = a
n.u = l
b.y = l
e.o = b
e.q = l
e.v = l
e.t = n
g.x = b
l.s = f
l.u = n
a.o = i
a.q = n
a.v = n
a.t = n
assert a.v.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

h = A("h")
i = B("i")
f = C("f")
n = D("n")
b = B("b")
e = C("e")
g = A("g")
l = D("l")
a = C("a")

h.x = b
i.y = l
f.o = b
f.q = l
f.v = l
f.t = l
n.s = a
n.u = l
b.y = l
e.o = b
e.q = l
e.v = l
e.t = n
g.x = b
l.s = f
l.u = n
a.o = i
a.q = n
a.v = n
a.t = n
assert a.v.u.u.txt == "n"