class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: I = None
        self.o: D = None
        self.s: C = None
        self.t: C = None
        self.u: H = None
        self.q: E = None
        self.z: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: F = None
        self.q: I = None
        self.t: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: I = None
        self.v: D = None
        self.s: C = None
        self.o: J = None
        self.q: J = None
        self.z: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: D = None
        self.u: D = None
        self.v: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: I = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: F = None
        self.q: I = None
        self.t: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: I = None
        self.v: D = None
        self.s: C = None
        self.o: J = None
        self.q: J = None
        self.z: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: D = None
        self.u: D = None
        self.v: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: I = None
        self.x: A = None
        self.txt = txt

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

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