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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: F = None
        self.z: G = None
        self.v: B = None
        self.x: H = None
        self.q: D = None
        self.u: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: D = None
        self.s: C = None
        self.w: J = None
        self.v: D = None
        self.q: C = None
        self.u: B = None
        self.p: B = None
        self.x: D = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: A = None
        self.w: G = None
        self.t: G = None
        self.z: G = None
        self.s: D = None
        self.v: G = None
        self.r: D = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: C = None
        self.q: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: D = None
        self.x: C = None
        self.w: I = None
        self.p: C = None
        self.o: H = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: F = None
        self.z: G = None
        self.v: B = None
        self.x: H = None
        self.q: D = None
        self.u: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: D = None
        self.s: C = None
        self.w: J = None
        self.v: D = None
        self.q: C = None
        self.u: B = None
        self.p: B = None
        self.x: D = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: A = None
        self.w: G = None
        self.t: G = None
        self.z: G = None
        self.s: D = None
        self.v: G = None
        self.r: D = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: C = None
        self.q: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: D = None
        self.x: C = None
        self.w: I = None
        self.p: C = None
        self.o: H = None
        self.z: B = None
        self.txt = txt

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

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