def find_five_cycle(A):
   """Try to find a cycle of positive off-diagonal elemnts in submatrix

   Let ``M `` be the subatrix ``A[1:6, 1:6]`` of the symmetric matrix 
   ``A``. The function entries to find a cycle of length 5 such that
   ``A[i0, i1] > 0`` for any adjacent entries ``i0, i1`` of the cycle.

   If such a cycle exists then the function returns that cycle as a list
   of integers between 1 and 6, correspondig to the indices of ``A``.
   If no such cycle exist the the function returns the empty list.
 
   The function checks the following condition (and returns ``[]`` if
   any of them is not satisfied):

   * ``A[:6, 6:]`` must be zero.

   * The diagonal of ``A[:6]`` must be nonnegative.

   * A[0,:] must be nonnegative.

   * ``A[i, 1:6], 1 <= i < 6`` must have precisely two (off-diagonal)
     negative entries.   
   """
   if min(A[0]) < 0: 
       return []
   for i in range(1,6):
       x = sum(x < 0 for x in A[i])
       if (x != 2) or A[i,i] < 0:
           return []
   if max(abs(A[:6, 6:].ravel())) > 0:
       return []
   l = [1]
   for i in range(5):
       for j in range(1,6):
           if A[j, l[-1]] > 0 and j not in l:
               l.append(j)
               break
   if len(l) < 5 or A[l[0],l[-1]] < 0:
       return []
   return l