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

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

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

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

e.u = a
e.y = a
a.o = l
l.t = a
assert e.u.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: B = None
        self.txt = txt

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

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

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

e.u = a
e.y = a
a.o = l
l.t = a
assert e.u.o.t.txt == "a"