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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: B = None
        self.r: A = None
        self.p: D = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: B = None
        self.r: A = None
        self.p: D = None
        self.o: A = None
        self.txt = txt

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

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

h.x = e
h.v = l
l.w = k
e.r = n
e.w = n
e.y = h
b.y = j
b.u = l
b.r = h
b.o = h
b.p = f
n.p = i
n.o = i
n.u = i
n.t = h
i.p = n
i.o = n
i.t = h
i.u = k
k.p = n
k.o = n
k.t = h
k.u = i
j.r = k
j.w = k
j.y = c
f.y = e
f.u = l
f.r = c
f.p = b
f.o = h
c.x = j
c.v = l
assert k.u.p.p.t.v.w.t.txt == "h"