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

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

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

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

j.v = n
j.z = e
e.t = n
n.u = e
assert n.u.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: B = None
        self.txt = txt

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

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

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

j.v = n
j.z = e
e.t = n
n.u = e
assert n.u.t.u.txt == "e"