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

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

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

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

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

a = A("a")
i = B("i")
l = C("l")
c = D("c")
k = E("k")

a.o = i
a.t = i
i.r = l
i.z = l
i.p = c
i.v = a
i.w = k
l.v = c
l.y = a
l.r = a
c.u = a
k.r = c
assert c.u.o.v.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: B = None
        self.txt = txt

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

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

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

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

a = A("a")
i = B("i")
l = C("l")
c = D("c")
k = E("k")

a.o = i
a.t = i
i.r = l
i.z = l
i.p = c
i.v = a
i.w = k
l.v = c
l.y = a
l.r = a
c.u = a
k.r = c
assert c.u.o.v.o.txt == "i"