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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: E = None
        self.x: F = None
        self.u: H = None
        self.q: E = None
        self.z: J = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: A = None
        self.p: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: D = None
        self.s: B = None
        self.t: I = None
        self.r: G = None
        self.o: B = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: E = None
        self.x: F = None
        self.u: H = None
        self.q: E = None
        self.z: J = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: A = None
        self.p: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: D = None
        self.s: B = None
        self.t: I = None
        self.r: G = None
        self.o: B = None
        self.u: B = None
        self.txt = txt

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

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

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

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