class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: J = None
        self.y: I = None
        self.u: C = None
        self.v: F = None
        self.r: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: F = None
        self.s: F = None
        self.z: F = None
        self.x: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: H = None
        self.y: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: E = None
        self.x: H = None
        self.t: B = None
        self.p: G = None
        self.s: B = None
        self.z: E = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: F = None
        self.s: F = None
        self.z: F = None
        self.x: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: H = None
        self.y: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: E = None
        self.x: H = None
        self.t: B = None
        self.p: G = None
        self.s: B = None
        self.z: E = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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