class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: F = None
        self.u: B = None
        self.s: H = None
        self.q: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: F = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: F = None
        self.u: B = None
        self.s: H = None
        self.q: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: F = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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