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

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

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

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

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

m = A("m")
a = B("a")
n = C("n")
i = D("i")
g = E("g")
l = C("l")
c = E("c")

m.z = g
a.s = m
a.v = i
a.r = l
n.x = c
n.o = c
n.y = m
n.u = i
i.s = m
g.v = c
g.p = c
g.z = c
g.x = m
l.x = g
l.o = g
l.y = m
l.u = i
c.v = g
c.p = g
c.z = g
c.x = m
assert n.y.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

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

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

m = A("m")
a = B("a")
n = C("n")
i = D("i")
g = E("g")
l = C("l")
c = E("c")

m.z = g
a.s = m
a.v = i
a.r = l
n.x = c
n.o = c
n.y = m
n.u = i
i.s = m
g.v = c
g.p = c
g.z = c
g.x = m
l.x = g
l.o = g
l.y = m
l.u = i
c.v = g
c.p = g
c.z = g
c.x = m
assert n.y.z.x.txt == "m"