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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: B = None
        self.w: D = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: B = None
        self.w: D = None
        self.u: E = None
        self.txt = txt

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

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

i.z = c
i.v = l
e.w = b
e.q = b
e.t = b
c.o = e
d.v = i
d.r = e
d.w = l
d.u = b
b.w = c
b.s = d
b.t = i
l.v = i
l.r = e
l.w = d
l.u = b
assert i.z.o.q.t.txt == "i"