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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: H = None
        self.y: D = None
        self.v: J = None
        self.p: G = None
        self.r: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: I = None
        self.v: I = None
        self.w: G = None
        self.z: H = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: B = None
        self.s: H = None
        self.v: G = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: A = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: H = None
        self.y: D = None
        self.v: J = None
        self.p: G = None
        self.r: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: I = None
        self.v: I = None
        self.w: G = None
        self.z: H = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: B = None
        self.s: H = None
        self.v: G = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: A = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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