class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: D = None
        self.w: A = None
        self.s: D = None
        self.p: I = None
        self.z: H = None
        self.t: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: D = None
        self.q: J = None
        self.p: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: D = None
        self.w: A = None
        self.s: D = None
        self.p: I = None
        self.z: H = None
        self.t: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: D = None
        self.q: J = None
        self.p: J = None
        self.txt = txt

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

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

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