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

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

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

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

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

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

l.x = h
l.t = h
l.w = n
l.r = c
n.v = k
h.z = n
h.t = n
h.q = k
h.v = c
i.r = c
i.z = h
i.t = a
i.u = k
k.q = h
k.y = f
k.z = f
k.v = a
b.x = f
b.t = f
b.w = n
b.r = a
a.r = c
a.z = f
a.t = i
a.u = k
j.v = k
f.z = j
f.t = j
f.q = k
f.v = a
c.r = a
c.z = f
c.t = i
c.u = k
assert l.w.v.z.v.r.z.q.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: B = None
        self.t: C = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

l.x = h
l.t = h
l.w = n
l.r = c
n.v = k
h.z = n
h.t = n
h.q = k
h.v = c
i.r = c
i.z = h
i.t = a
i.u = k
k.q = h
k.y = f
k.z = f
k.v = a
b.x = f
b.t = f
b.w = n
b.r = a
a.r = c
a.z = f
a.t = i
a.u = k
j.v = k
f.z = j
f.t = j
f.q = k
f.v = a
c.r = a
c.z = f
c.t = i
c.u = k
assert l.w.v.z.v.r.z.q.v.t.txt == "i"