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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: E = None
        self.r: E = None
        self.y: A = None
        self.p: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: C = None
        self.u: C = None
        self.z: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: E = None
        self.r: E = None
        self.y: A = None
        self.p: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: C = None
        self.u: C = None
        self.z: B = None
        self.txt = txt

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

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