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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: B = None
        self.r: C = None
        self.w: F = None
        self.t: A = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: F = None
        self.txt = txt

m = A("m")
e = B("e")
d = C("d")
l = D("l")
h = E("h")
i = F("i")
c = G("c")
n = B("n")
b = F("b")
a = C("a")

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: B = None
        self.r: C = None
        self.w: F = None
        self.t: A = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: F = None
        self.txt = txt

m = A("m")
e = B("e")
d = C("d")
l = D("l")
h = E("h")
i = F("i")
c = G("c")
n = B("n")
b = F("b")
a = C("a")

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