class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.t: B = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.w: B = None
        self.x: G = None
        self.o: F = None
        self.z: C = None
        self.p: F = None
        self.v: A = None
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: E = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: A = None
        self.y: C = None
        self.r: J = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: C = None
        self.v: E = None
        self.z: D = None
        self.q: C = None
        self.x: C = None
        self.s: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: C = None
        self.t: D = None
        self.z: F = None
        self.s: F = None
        self.w: G = None
        self.y: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.w: B = None
        self.x: G = None
        self.o: F = None
        self.z: C = None
        self.p: F = None
        self.v: A = None
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: E = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: A = None
        self.y: C = None
        self.r: J = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: C = None
        self.v: E = None
        self.z: D = None
        self.q: C = None
        self.x: C = None
        self.s: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: C = None
        self.t: D = None
        self.z: F = None
        self.s: F = None
        self.w: G = None
        self.y: H = None
        self.txt = txt

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

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