class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.t: G = None
        self.p: A = None
        self.x: E = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: G = None
        self.y: G = None
        self.p: J = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: J = None
        self.w: A = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.t: G = None
        self.p: A = None
        self.x: E = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: G = None
        self.y: G = None
        self.p: J = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: J = None
        self.w: A = None
        self.z: I = None
        self.txt = txt

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

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

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

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