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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

e = A("e")
d = B("d")
j = C("j")
c = D("c")
l = E("l")
i = D("i")

e.t = j
e.v = c
e.x = c
d.w = l
d.o = c
j.w = i
j.v = d
j.s = l
c.t = j
c.w = l
c.s = d
l.x = i
i.t = j
i.w = l
i.s = d
assert i.t.s.x.s.w.x.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: D = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

e = A("e")
d = B("d")
j = C("j")
c = D("c")
l = E("l")
i = D("i")

e.t = j
e.v = c
e.x = c
d.w = l
d.o = c
j.w = i
j.v = d
j.s = l
c.t = j
c.w = l
c.s = d
l.x = i
i.t = j
i.w = l
i.s = d
assert i.t.s.x.s.w.x.txt == "i"