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

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

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

n = A("n")
e = B("e")
k = C("k")

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

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

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

n = A("n")
e = B("e")
k = C("k")

n.z = e
n.s = e
n.x = e
e.s = n
k.y = e
assert k.y.s.s.txt == "e"