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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.txt = txt

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

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

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

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