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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: F = None
        self.t: J = None
        self.w: G = None
        self.p: A = None
        self.y: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: J = None
        self.z: A = None
        self.o: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: B = None
        self.o: B = None
        self.z: C = None
        self.w: G = None
        self.t: H = None
        self.v: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: F = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: B = None
        self.o: I = None
        self.y: A = None
        self.s: G = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: H = None
        self.q: G = None
        self.w: F = None
        self.s: F = None
        self.z: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: F = None
        self.t: J = None
        self.w: G = None
        self.p: A = None
        self.y: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: J = None
        self.z: A = None
        self.o: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: B = None
        self.o: B = None
        self.z: C = None
        self.w: G = None
        self.t: H = None
        self.v: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: F = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: B = None
        self.o: I = None
        self.y: A = None
        self.s: G = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: H = None
        self.q: G = None
        self.w: F = None
        self.s: F = None
        self.z: J = None
        self.txt = txt

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

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

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