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

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

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

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

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

d = A("d")
a = B("a")
e = C("e")
l = D("l")
n = E("n")

d.v = e
d.o = e
d.r = a
d.t = a
a.w = l
a.p = l
a.u = l
a.o = d
a.s = n
e.t = d
e.y = l
l.t = d
l.o = a
n.o = l
n.x = d
n.p = e
n.r = e
n.t = a
assert d.r.s.x.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.r: B = None
        self.t: B = None
        self.txt = txt

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

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

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

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

d = A("d")
a = B("a")
e = C("e")
l = D("l")
n = E("n")

d.v = e
d.o = e
d.r = a
d.t = a
a.w = l
a.p = l
a.u = l
a.o = d
a.s = n
e.t = d
e.y = l
l.t = d
l.o = a
n.o = l
n.x = d
n.p = e
n.r = e
n.t = a
assert d.r.s.x.v.txt == "e"