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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: F = None
        self.x: F = None
        self.w: C = None
        self.v: I = None
        self.r: G = None
        self.o: E = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: C = None
        self.y: I = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: A = None
        self.u: G = None
        self.r: D = None
        self.q: G = None
        self.p: D = None
        self.o: D = None
        self.z: A = None
        self.w: B = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.q: F = None
        self.p: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: G = None
        self.r: E = None
        self.u: B = None
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: F = None
        self.x: F = None
        self.w: C = None
        self.v: I = None
        self.r: G = None
        self.o: E = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: C = None
        self.y: I = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: A = None
        self.u: G = None
        self.r: D = None
        self.q: G = None
        self.p: D = None
        self.o: D = None
        self.z: A = None
        self.w: B = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.q: F = None
        self.p: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: G = None
        self.r: E = None
        self.u: B = None
        self.q: E = None
        self.txt = txt

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

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