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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: C = None
        self.y: A = None
        self.r: D = None
        self.z: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: E = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: I = None
        self.y: D = None
        self.p: C = None
        self.o: C = None
        self.r: A = None
        self.w: E = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: A = None
        self.p: F = None
        self.z: F = None
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: C = None
        self.y: A = None
        self.r: D = None
        self.z: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: E = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: I = None
        self.y: D = None
        self.p: C = None
        self.o: C = None
        self.r: A = None
        self.w: E = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: A = None
        self.p: F = None
        self.z: F = None
        self.x: E = None
        self.txt = txt

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

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