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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: F = None
        self.v: F = None
        self.s: B = None
        self.z: H = None
        self.y: B = None
        self.r: E = None
        self.t: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: I = None
        self.t: D = None
        self.p: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: E = None
        self.u: G = None
        self.v: A = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: G = None
        self.x: A = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: C = None
        self.u: B = None
        self.x: F = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: F = None
        self.v: F = None
        self.s: B = None
        self.z: H = None
        self.y: B = None
        self.r: E = None
        self.t: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: I = None
        self.t: D = None
        self.p: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: E = None
        self.u: G = None
        self.v: A = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: G = None
        self.x: A = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: C = None
        self.u: B = None
        self.x: F = None
        self.z: C = None
        self.txt = txt

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

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