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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: E = None
        self.r: B = None
        self.y: F = None
        self.o: H = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: E = None
        self.r: B = None
        self.y: F = None
        self.o: H = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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