class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: F = None
        self.w: H = None
        self.x: C = None
        self.q: E = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: H = None
        self.t: A = None
        self.u: I = None
        self.p: G = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: C = None
        self.v: D = None
        self.y: H = None
        self.x: C = None
        self.s: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: H = None
        self.y: F = None
        self.z: H = None
        self.o: I = None
        self.v: H = None
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: F = None
        self.w: H = None
        self.x: C = None
        self.q: E = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: H = None
        self.t: A = None
        self.u: I = None
        self.p: G = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: C = None
        self.v: D = None
        self.y: H = None
        self.x: C = None
        self.s: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: H = None
        self.y: F = None
        self.z: H = None
        self.o: I = None
        self.v: H = None
        self.t: G = None
        self.txt = txt

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

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