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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: I = None
        self.z: J = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: C = None
        self.u: J = None
        self.w: C = None
        self.p: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: I = None
        self.z: J = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: C = None
        self.u: J = None
        self.w: C = None
        self.p: D = None
        self.txt = txt

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

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

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