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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: I = None
        self.z: F = None
        self.y: E = None
        self.p: F = None
        self.v: J = None
        self.w: I = None
        self.x: H = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: I = None
        self.z: F = None
        self.y: E = None
        self.p: F = None
        self.v: J = None
        self.w: I = None
        self.x: H = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

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