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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.p: A = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.p: A = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

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

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