class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: H = None
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: D = None
        self.u: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: H = None
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: D = None
        self.u: I = None
        self.txt = txt

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

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

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

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

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

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

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