st A '''
  D = len(A[0])
  N = len(A)

  v_res = [0.] * D
  <b>for</b> i in xrange(0, D):
    <b>for</b> jk in xrange(0, D ** N):
      v_ijk = [i] + [(jk/(D ** (N-j-1))) % D <b>for</b> j in xrange(0, N)]
      t_res = v__E(v_ijk)
      if t_res != 0:
        <b>for</b> k in xrange(0, N):
          t_res *= A[k][v_ijk[k + 1]]
        v_res[i] += t_res
  return v_res
  

def solution_for(A, B):
  p = [0. for each in B]
  <b>for</b> i in xrange(len(A)):
    plane_n = A[i]
    plane_d = -B[i]
    other_planes_