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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.p: C = None
        self.txt = txt

i = A("i")
g = B("g")
m = C("m")
n = C("n")
f = B("f")
b = C("b")
l = A("l")
h = B("h")

i.v = m
g.p = i
g.o = l
g.t = l
m.u = g
m.z = g
m.p = b
n.u = h
n.z = f
n.p = m
f.p = l
f.o = i
f.t = i
b.u = f
b.z = f
b.p = n
l.v = n
h.p = l
h.t = l
h.o = i
assert l.v.p.z.o.v.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.p: C = None
        self.txt = txt

i = A("i")
g = B("g")
m = C("m")
n = C("n")
f = B("f")
b = C("b")
l = A("l")
h = B("h")

i.v = m
g.p = i
g.o = l
g.t = l
m.u = g
m.z = g
m.p = b
n.u = h
n.z = f
n.p = m
f.p = l
f.o = i
f.t = i
b.u = f
b.z = f
b.p = n
l.v = n
h.p = l
h.t = l
h.o = i
assert l.v.p.z.o.v.u.txt == "h"