class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: D = None
        self.s: I = None
        self.t: B = None
        self.v: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: G = None
        self.o: H = None
        self.y: G = None
        self.p: H = None
        self.u: E = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: C = None
        self.y: H = None
        self.s: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: F = None
        self.q: F = None
        self.y: H = None
        self.u: H = None
        self.s: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: G = None
        self.o: H = None
        self.y: G = None
        self.p: H = None
        self.u: E = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: C = None
        self.y: H = None
        self.s: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: F = None
        self.q: F = None
        self.y: H = None
        self.u: H = None
        self.s: I = None
        self.txt = txt

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

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