class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: C = None
        self.s: H = None
        self.z: B = None
        self.w: B = None
        self.y: J = None
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: C = None
        self.w: I = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: D = None
        self.v: C = None
        self.r: G = None
        self.z: A = None
        self.q: I = None
        self.t: E = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: B = None
        self.s: D = None
        self.u: J = None
        self.o: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: C = None
        self.w: I = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: D = None
        self.v: C = None
        self.r: G = None
        self.z: A = None
        self.q: I = None
        self.t: E = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: B = None
        self.s: D = None
        self.u: J = None
        self.o: G = None
        self.txt = txt

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

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

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