class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: B = None
        self.o: B = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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