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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: J = None
        self.w: E = None
        self.x: J = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: D = None
        self.s: J = None
        self.t: A = None
        self.x: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: G = None
        self.s: A = None
        self.t: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: J = None
        self.w: E = None
        self.x: J = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: D = None
        self.s: J = None
        self.t: A = None
        self.x: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: G = None
        self.s: A = None
        self.t: B = None
        self.txt = txt

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

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