class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: D = None
        self.w: I = None
        self.s: G = None
        self.v: H = None
        self.t: J = None
        self.o: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: C = None
        self.w: H = None
        self.x: I = None
        self.p: B = None
        self.t: A = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: G = None
        self.w: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: D = None
        self.s: E = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: C = None
        self.w: H = None
        self.x: I = None
        self.p: B = None
        self.t: A = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: G = None
        self.w: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: D = None
        self.s: E = None
        self.q: B = None
        self.txt = txt

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

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