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

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

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

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

e.t = l
e.x = l
e.y = l
h.w = e
l.y = e
assert e.t.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: C = None
        self.y: C = None
        self.txt = txt

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

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

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

e.t = l
e.x = l
e.y = l
h.w = e
l.y = e
assert e.t.y.y.txt == "l"