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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: G = None
        self.q: J = None
        self.u: G = None
        self.p: D = None
        self.z: A = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: J = None
        self.o: D = None
        self.s: E = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: F = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: G = None
        self.q: J = None
        self.u: G = None
        self.p: D = None
        self.z: A = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: J = None
        self.o: D = None
        self.s: E = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: F = None
        self.r: D = None
        self.txt = txt

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

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

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

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