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

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

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

b = A("b")
d = B("d")
k = C("k")
l = A("l")
n = C("n")
e = B("e")

b.o = d
b.y = l
d.t = l
d.o = n
d.s = n
k.z = n
k.v = n
k.x = n
l.o = d
l.y = b
n.z = k
n.v = k
n.x = k
e.t = l
e.o = k
e.s = k
assert l.o.t.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.txt = txt

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

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

b = A("b")
d = B("d")
k = C("k")
l = A("l")
n = C("n")
e = B("e")

b.o = d
b.y = l
d.t = l
d.o = n
d.s = n
k.z = n
k.v = n
k.x = n
l.o = d
l.y = b
n.z = k
n.v = k
n.x = k
e.t = l
e.o = k
e.s = k
assert l.o.t.y.y.txt == "l"