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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: I = None
        self.p: F = None
        self.w: H = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: J = None
        self.t: D = None
        self.y: D = None
        self.v: C = None
        self.o: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: I = None
        self.p: F = None
        self.w: H = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: J = None
        self.t: D = None
        self.y: D = None
        self.v: C = None
        self.o: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

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