class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: D = None
        self.t: B = None
        self.o: J = None
        self.w: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.w: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: E = None
        self.p: J = None
        self.v: C = None
        self.t: B = None
        self.x: I = None
        self.q: J = None
        self.o: B = None
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: E = None
        self.x: G = None
        self.t: F = None
        self.u: B = None
        self.s: J = None
        self.z: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.w: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: E = None
        self.p: J = None
        self.v: C = None
        self.t: B = None
        self.x: I = None
        self.q: J = None
        self.o: B = None
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: E = None
        self.x: G = None
        self.t: F = None
        self.u: B = None
        self.s: J = None
        self.z: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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