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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: B = None
        self.x: F = None
        self.t: G = None
        self.p: D = None
        self.z: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: C = None
        self.o: F = None
        self.p: H = None
        self.t: C = None
        self.r: G = None
        self.y: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: H = None
        self.r: C = None
        self.o: A = None
        self.w: F = None
        self.s: H = None
        self.p: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: B = None
        self.x: F = None
        self.t: G = None
        self.p: D = None
        self.z: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: C = None
        self.o: F = None
        self.p: H = None
        self.t: C = None
        self.r: G = None
        self.y: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: H = None
        self.r: C = None
        self.o: A = None
        self.w: F = None
        self.s: H = None
        self.p: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: I = None
        self.txt = txt

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

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