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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: H = None
        self.u: G = None
        self.x: G = None
        self.z: J = None
        self.r: E = None
        self.t: D = None
        self.y: D = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: E = None
        self.q: H = None
        self.o: G = None
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: D = None
        self.p: H = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: B = None
        self.u: G = None
        self.p: D = None
        self.q: G = None
        self.txt = txt

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

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

j = A("j")
g = B("g")
n = C("n")
k = D("k")
h = E("h")
e = F("e")
a = G("a")
c = H("c")
l = I("l")
d = J("d")

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: H = None
        self.u: G = None
        self.x: G = None
        self.z: J = None
        self.r: E = None
        self.t: D = None
        self.y: D = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: E = None
        self.q: H = None
        self.o: G = None
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: D = None
        self.p: H = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: B = None
        self.u: G = None
        self.p: D = None
        self.q: G = None
        self.txt = txt

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

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

j = A("j")
g = B("g")
n = C("n")
k = D("k")
h = E("h")
e = F("e")
a = G("a")
c = H("c")
l = I("l")
d = J("d")

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