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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: A = None
        self.t: F = None
        self.v: G = None
        self.s: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: A = None
        self.t: F = None
        self.v: G = None
        self.s: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

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

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

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

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