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

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

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

g = A("g")
k = B("k")
c = C("c")
i = A("i")
b = B("b")
l = C("l")

g.y = b
k.u = c
k.o = c
k.z = c
c.t = l
i.y = b
b.u = c
b.z = c
b.o = l
l.t = c
assert i.y.o.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

g = A("g")
k = B("k")
c = C("c")
i = A("i")
b = B("b")
l = C("l")

g.y = b
k.u = c
k.o = c
k.z = c
c.t = l
i.y = b
b.u = c
b.z = c
b.o = l
l.t = c
assert i.y.o.t.t.txt == "l"