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

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

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

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

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

j = A("j")
l = B("l")
k = C("k")
i = D("i")
a = E("a")
h = D("h")
n = C("n")
d = E("d")

j.x = n
j.t = k
j.q = i
l.y = k
l.t = h
l.u = h
l.v = j
k.o = l
k.v = l
i.t = n
i.y = n
i.p = d
i.s = l
i.r = h
a.z = i
a.o = l
h.t = n
h.p = a
h.y = k
h.s = l
h.r = i
n.o = l
n.v = l
d.z = h
d.o = l
assert l.u.y.o.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: C = None
        self.q: D = None
        self.txt = txt

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

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

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

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

j = A("j")
l = B("l")
k = C("k")
i = D("i")
a = E("a")
h = D("h")
n = C("n")
d = E("d")

j.x = n
j.t = k
j.q = i
l.y = k
l.t = h
l.u = h
l.v = j
k.o = l
k.v = l
i.t = n
i.y = n
i.p = d
i.s = l
i.r = h
a.z = i
a.o = l
h.t = n
h.p = a
h.y = k
h.s = l
h.r = i
n.o = l
n.v = l
d.z = h
d.o = l
assert l.u.y.o.u.txt == "h"