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

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

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

b = A("b")
e = B("e")
l = C("l")

b.v = e
e.s = l
e.w = l
l.r = e
l.t = e
assert l.t.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

b = A("b")
e = B("e")
l = C("l")

b.v = e
e.s = l
e.w = l
l.r = e
l.t = e
assert l.t.s.t.txt == "e"