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

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

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

e = A("e")
l = B("l")
d = C("d")
j = C("j")
i = C("i")
m = A("m")

e.w = m
e.t = m
e.x = m
l.p = e
d.v = e
j.v = e
i.v = m
m.w = e
m.t = e
m.x = e
assert e.w.x.t.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: A = None
        self.x: A = None
        self.txt = txt

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

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

e = A("e")
l = B("l")
d = C("d")
j = C("j")
i = C("i")
m = A("m")

e.w = m
e.t = m
e.x = m
l.p = e
d.v = e
j.v = e
i.v = m
m.w = e
m.t = e
m.x = e
assert e.w.x.t.x.txt == "e"