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

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

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

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

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

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

i.o = m
i.v = n
i.z = l
i.y = d
k.o = i
k.t = h
a.u = i
d.p = i
d.r = i
d.v = n
n.v = h
m.o = i
m.t = c
l.u = i
c.p = i
c.r = i
c.v = n
e.u = i
h.p = i
h.r = i
h.v = n
assert e.u.y.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: E = None
        self.z: C = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

i.o = m
i.v = n
i.z = l
i.y = d
k.o = i
k.t = h
a.u = i
d.p = i
d.r = i
d.v = n
n.v = h
m.o = i
m.t = c
l.u = i
c.p = i
c.r = i
c.v = n
e.u = i
h.p = i
h.r = i
h.v = n
assert e.u.y.v.v.txt == "h"