class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: H = None
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: E = None
        self.q: I = None
        self.u: A = None
        self.v: H = None
        self.y: E = None
        self.w: I = None
        self.s: C = None
        self.o: F = None
        self.r: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: G = None
        self.t: I = None
        self.s: B = None
        self.x: J = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: C = None
        self.q: H = None
        self.s: A = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: C = None
        self.y: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: E = None
        self.y: A = None
        self.o: I = None
        self.p: C = None
        self.v: E = None
        self.x: I = None
        self.r: D = None
        self.txt = txt

n = A("n")
k = B("k")
a = C("a")
e = D("e")
i = E("i")
m = F("m")
c = G("c")
g = H("g")
b = I("b")
l = J("l")

n.z = m
n.o = g
n.q = b
k.p = a
k.s = a
k.z = i
k.y = i
k.q = b
k.w = b
k.u = n
k.v = g
k.o = m
k.r = l
a.y = m
a.p = c
a.t = b
a.s = k
a.x = l
a.r = g
e.w = i
e.p = a
e.q = g
e.s = n
e.u = l
i.q = n
i.v = m
m.y = e
m.s = c
c.z = l
c.u = g
g.r = i
g.s = a
g.y = k
b.o = e
b.w = a
l.t = c
l.z = i
l.v = i
l.y = n
l.o = b
l.x = b
l.p = a
l.r = e
assert m.s.u.y.w.o.q.r.v.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: H = None
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: E = None
        self.q: I = None
        self.u: A = None
        self.v: H = None
        self.y: E = None
        self.w: I = None
        self.s: C = None
        self.o: F = None
        self.r: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: G = None
        self.t: I = None
        self.s: B = None
        self.x: J = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: C = None
        self.q: H = None
        self.s: A = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: C = None
        self.y: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: E = None
        self.y: A = None
        self.o: I = None
        self.p: C = None
        self.v: E = None
        self.x: I = None
        self.r: D = None
        self.txt = txt

n = A("n")
k = B("k")
a = C("a")
e = D("e")
i = E("i")
m = F("m")
c = G("c")
g = H("g")
b = I("b")
l = J("l")

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