class A:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: D = None
        self.w: G = None
        self.s: F = None
        self.z: C = None
        self.r: D = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: D = None
        self.q: J = None
        self.r: J = None
        self.z: C = None
        self.t: F = None
        self.p: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: E = None
        self.q: A = None
        self.o: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: G = None
        self.v: D = None
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: D = None
        self.q: J = None
        self.r: J = None
        self.z: C = None
        self.t: F = None
        self.p: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: E = None
        self.q: A = None
        self.o: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: G = None
        self.v: D = None
        self.y: G = None
        self.txt = txt

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

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