class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: J = None
        self.r: E = None
        self.s: D = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: A = None
        self.o: D = None
        self.s: D = None
        self.y: J = None
        self.p: E = None
        self.v: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: G = None
        self.s: E = None
        self.z: G = None
        self.v: E = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: A = None
        self.o: D = None
        self.s: D = None
        self.y: J = None
        self.p: E = None
        self.v: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: G = None
        self.s: E = None
        self.z: G = None
        self.v: E = None
        self.r: B = None
        self.txt = txt

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

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