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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: D = None
        self.r: E = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: D = None
        self.r: E = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.v: B = None
        self.txt = txt

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

i.t = j
i.z = l
l.q = k
l.p = k
l.u = d
d.p = k
d.y = b
d.s = l
d.t = h
j.w = n
j.q = k
j.r = e
j.o = h
e.p = b
e.t = k
e.v = l
c.q = j
c.p = k
c.u = h
h.p = j
h.y = e
h.s = c
h.t = d
b.p = e
b.t = j
b.v = c
k.w = n
k.q = j
k.r = e
k.o = d
n.t = j
n.z = c
assert i.t.q.r.v.u.txt == "d"