class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: H = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: I = None
        self.r: I = None
        self.q: J = None
        self.t: D = None
        self.x: J = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: H = None
        self.x: B = None
        self.y: H = None
        self.p: E = None
        self.w: B = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: H = None
        self.r: H = None
        self.y: B = None
        self.v: F = None
        self.w: I = None
        self.u: F = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: I = None
        self.r: I = None
        self.q: J = None
        self.t: D = None
        self.x: J = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: H = None
        self.x: B = None
        self.y: H = None
        self.p: E = None
        self.w: B = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: H = None
        self.r: H = None
        self.y: B = None
        self.v: F = None
        self.w: I = None
        self.u: F = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

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

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