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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: D = None
        self.w: B = None
        self.y: B = None
        self.txt = txt

i = A("i")
e = B("e")
f = C("f")
n = D("n")
a = E("a")

i.s = f
i.z = e
e.o = a
e.s = a
e.v = f
e.t = n
f.x = e
n.y = e
a.q = f
a.r = n
a.w = e
a.y = e
assert n.y.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: D = None
        self.w: B = None
        self.y: B = None
        self.txt = txt

i = A("i")
e = B("e")
f = C("f")
n = D("n")
a = E("a")

i.s = f
i.z = e
e.o = a
e.s = a
e.v = f
e.t = n
f.x = e
n.y = e
a.q = f
a.r = n
a.w = e
a.y = e
assert n.y.t.y.txt == "e"