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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: B = None
        self.txt = txt

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

i = A("i")
l = B("l")
h = C("h")
k = C("k")
f = A("f")
d = B("d")
b = A("b")
a = C("a")

i.v = a
l.y = a
l.q = d
h.t = f
h.o = k
k.t = f
k.o = a
f.v = k
d.y = h
d.q = l
b.v = h
a.t = f
a.o = k
assert i.v.t.v.o.o.o.t.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: B = None
        self.txt = txt

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

i = A("i")
l = B("l")
h = C("h")
k = C("k")
f = A("f")
d = B("d")
b = A("b")
a = C("a")

i.v = a
l.y = a
l.q = d
h.t = f
h.o = k
k.t = f
k.o = a
f.v = k
d.y = h
d.q = l
b.v = h
a.t = f
a.o = k
assert i.v.t.v.o.o.o.t.v.txt == "k"