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

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

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

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

i = A("i")
l = B("l")
e = C("e")
h = D("h")
n = C("n")
a = B("a")
c = D("c")
m = B("m")
j = D("j")
g = A("g")

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

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

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

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

i = A("i")
l = B("l")
e = C("e")
h = D("h")
n = C("n")
a = B("a")
c = D("c")
m = B("m")
j = D("j")
g = A("g")

i.u = l
i.s = j
i.w = e
l.v = e
l.q = e
l.u = h
l.p = h
e.o = c
h.q = m
h.x = j
h.t = j
h.p = e
n.o = h
a.v = n
a.q = n
a.u = h
a.p = h
c.q = m
c.x = j
c.t = h
c.p = n
m.v = n
m.q = n
m.u = c
m.p = c
j.q = l
j.x = h
j.t = h
j.p = e
g.u = a
g.s = h
g.w = n
assert h.p.o.t.x.q.txt == "l"