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

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

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

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: E = None
        self.w: D = None
        self.r: A = None
        self.z: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: B = None
        self.y: B = None
        self.o: C = None
        self.txt = txt

m = A("m")
c = B("c")
k = C("k")
e = D("e")
l = E("l")
i = E("i")
n = D("n")
d = E("d")
f = B("f")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: E = None
        self.w: D = None
        self.r: A = None
        self.z: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: B = None
        self.y: B = None
        self.o: C = None
        self.txt = txt

m = A("m")
c = B("c")
k = C("k")
e = D("e")
l = E("l")
i = E("i")
n = D("n")
d = E("d")
f = B("f")

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