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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: A = None
        self.x: D = None
        self.y: A = None
        self.o: A = None
        self.q: A = None
        self.v: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: 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.w: A = None
        self.x: I = None
        self.o: C = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: F = None
        self.w: J = None
        self.o: A = None
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: E = None
        self.z: A = None
        self.w: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: A = None
        self.x: D = None
        self.y: A = None
        self.o: A = None
        self.q: A = None
        self.v: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: 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.w: A = None
        self.x: I = None
        self.o: C = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: F = None
        self.w: J = None
        self.o: A = None
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: E = None
        self.z: A = None
        self.w: G = None
        self.txt = txt

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

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