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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: E = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: B = None
        self.r: E = None
        self.x: E = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: A = None
        self.s: F = None
        self.v: J = None
        self.o: A = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: I = None
        self.t: H = None
        self.x: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: G = None
        self.x: H = None
        self.txt = txt

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

m = A("m")
b = B("b")
l = C("l")
j = D("j")
a = E("a")
h = F("h")
f = G("f")
k = H("k")
n = I("n")
i = J("i")

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: E = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: B = None
        self.r: E = None
        self.x: E = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: A = None
        self.s: F = None
        self.v: J = None
        self.o: A = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: I = None
        self.t: H = None
        self.x: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: G = None
        self.x: H = None
        self.txt = txt

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

m = A("m")
b = B("b")
l = C("l")
j = D("j")
a = E("a")
h = F("h")
f = G("f")
k = H("k")
n = I("n")
i = J("i")

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