class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: C = None
        self.v: C = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: C = None
        self.u: D = None
        self.v: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: C = None
        self.v: C = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: C = None
        self.u: D = None
        self.v: C = None
        self.txt = txt

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

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

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