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

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

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

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

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

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

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

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

l.t = c
l.u = c
h.z = c
h.v = a
f.o = a
f.t = a
c.t = l
c.u = l
k.o = d
k.t = a
d.z = l
d.v = h
m.z = c
m.v = g
g.z = c
g.v = m
a.z = l
a.v = g
assert c.t.u.t.t.t.u.u.txt == "l"