class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: D = None
        self.w: I = None
        self.p: J = None
        self.z: B = None
        self.t: J = None
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: A = None
        self.o: G = None
        self.s: D = None
        self.w: G = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: F = None
        self.p: D = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: A = None
        self.s: E = None
        self.u: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: H = None
        self.r: G = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: A = None
        self.o: G = None
        self.s: D = None
        self.w: G = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: F = None
        self.p: D = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: A = None
        self.s: E = None
        self.u: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: H = None
        self.r: G = None
        self.u: C = None
        self.txt = txt

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

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