class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.p: J = None
        self.z: F = None
        self.s: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: H = None
        self.o: H = None
        self.q: H = None
        self.s: H = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: F = None
        self.w: B = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: A = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: H = None
        self.o: H = None
        self.q: H = None
        self.s: H = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: F = None
        self.w: B = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: A = None
        self.t: C = None
        self.txt = txt

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

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