class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: I = None
        self.v: C = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: C = None
        self.u: G = None
        self.s: J = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: I = None
        self.s: B = None
        self.o: D = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: B = None
        self.s: I = None
        self.u: I = None
        self.v: I = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: G = None
        self.z: J = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: H = None
        self.p: H = None
        self.x: D = None
        self.w: A = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: F = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: H = None
        self.s: D = None
        self.p: C = None
        self.z: F = None
        self.r: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: C = None
        self.u: G = None
        self.s: J = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: I = None
        self.s: B = None
        self.o: D = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: B = None
        self.s: I = None
        self.u: I = None
        self.v: I = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: G = None
        self.z: J = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: H = None
        self.p: H = None
        self.x: D = None
        self.w: A = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: F = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: H = None
        self.s: D = None
        self.p: C = None
        self.z: F = None
        self.r: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: I = None
        self.txt = txt

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

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