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

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

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

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

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

h = A("h")
m = B("m")
n = C("n")
g = D("g")
a = E("a")
e = E("e")
f = C("f")
b = E("b")
c = D("c")
i = A("i")

h.v = f
m.z = i
m.p = h
m.o = b
m.v = g
m.y = g
n.s = f
n.r = f
n.x = m
g.z = f
a.v = c
a.q = h
a.s = i
a.u = b
e.v = c
e.q = h
e.s = i
e.u = b
f.s = n
f.r = n
f.x = m
b.v = g
b.q = h
b.s = i
b.u = a
c.z = n
i.v = n
assert c.z.x.p.v.x.z.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

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

h = A("h")
m = B("m")
n = C("n")
g = D("g")
a = E("a")
e = E("e")
f = C("f")
b = E("b")
c = D("c")
i = A("i")

h.v = f
m.z = i
m.p = h
m.o = b
m.v = g
m.y = g
n.s = f
n.r = f
n.x = m
g.z = f
a.v = c
a.q = h
a.s = i
a.u = b
e.v = c
e.q = h
e.s = i
e.u = b
f.s = n
f.r = n
f.x = m
b.v = g
b.q = h
b.s = i
b.u = a
c.z = n
i.v = n
assert c.z.x.p.v.x.z.v.x.txt == "m"