class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: E = None
        self.q: E = None
        self.u: E = None
        self.s: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

e = A("e")
i = B("i")
l = C("l")
g = D("g")
m = E("m")
c = B("c")
d = B("d")

e.r = l
e.y = m
e.q = m
e.u = m
e.s = g
i.x = e
i.u = e
i.s = e
i.z = c
l.t = m
g.o = l
m.u = i
m.w = c
m.s = g
m.t = e
c.x = e
c.u = e
c.s = e
c.z = d
d.x = e
d.u = e
d.s = e
d.z = c
assert i.z.u.s.o.t.u.z.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: E = None
        self.q: E = None
        self.u: E = None
        self.s: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

e = A("e")
i = B("i")
l = C("l")
g = D("g")
m = E("m")
c = B("c")
d = B("d")

e.r = l
e.y = m
e.q = m
e.u = m
e.s = g
i.x = e
i.u = e
i.s = e
i.z = c
l.t = m
g.o = l
m.u = i
m.w = c
m.s = g
m.t = e
c.x = e
c.u = e
c.s = e
c.z = d
d.x = e
d.u = e
d.s = e
d.z = c
assert i.z.u.s.o.t.u.z.txt == "c"