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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: D = None
        self.s: D = None
        self.txt = txt

m = A("m")
l = B("l")
g = C("g")
e = D("e")
d = E("d")
a = E("a")
k = A("k")

m.x = g
m.u = g
m.t = g
m.o = g
m.s = l
l.v = g
l.x = e
g.y = m
e.z = d
d.x = l
d.y = e
d.s = e
a.x = l
a.y = e
a.s = e
k.x = g
k.u = g
k.t = g
k.o = g
k.s = l
assert g.y.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: B = None
        self.u: C = None
        self.t: C = None
        self.o: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: D = None
        self.s: D = None
        self.txt = txt

m = A("m")
l = B("l")
g = C("g")
e = D("e")
d = E("d")
a = E("a")
k = A("k")

m.x = g
m.u = g
m.t = g
m.o = g
m.s = l
l.v = g
l.x = e
g.y = m
e.z = d
d.x = l
d.y = e
d.s = e
a.x = l
a.y = e
a.s = e
k.x = g
k.u = g
k.t = g
k.o = g
k.s = l
assert g.y.t.y.txt == "m"