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

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

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

c = A("c")
a = B("a")
m = C("m")
g = C("g")
h = C("h")
l = A("l")
j = C("j")
e = B("e")
k = B("k")
d = C("d")

c.v = j
c.r = m
a.s = l
a.u = l
m.o = a
m.z = g
g.o = k
g.z = j
h.o = e
h.z = d
l.v = j
l.r = h
j.o = k
j.z = h
e.s = c
e.u = c
k.s = l
k.u = c
d.o = e
d.z = h
assert h.o.s.r.o.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: C = None
        self.txt = txt

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

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

c = A("c")
a = B("a")
m = C("m")
g = C("g")
h = C("h")
l = A("l")
j = C("j")
e = B("e")
k = B("k")
d = C("d")

c.v = j
c.r = m
a.s = l
a.u = l
m.o = a
m.z = g
g.o = k
g.z = j
h.o = e
h.z = d
l.v = j
l.r = h
j.o = k
j.z = h
e.s = c
e.u = c
k.s = l
k.u = c
d.o = e
d.z = h
assert h.o.s.r.o.u.txt == "l"