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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: C = None
        self.s: I = None
        self.z: J = None
        self.q: J = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: F = None
        self.x: C = None
        self.r: J = None
        self.w: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: B = None
        self.s: B = None
        self.z: C = None
        self.u: J = None
        self.v: E = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: B = None
        self.z: J = None
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: F = None
        self.z: G = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: C = None
        self.s: I = None
        self.z: J = None
        self.q: J = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: F = None
        self.x: C = None
        self.r: J = None
        self.w: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: B = None
        self.s: B = None
        self.z: C = None
        self.u: J = None
        self.v: E = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: B = None
        self.z: J = None
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: F = None
        self.z: G = None
        self.r: B = None
        self.txt = txt

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

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