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

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

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

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

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

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

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

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

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

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

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

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

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