title: Find a list of unique representatives (elements) from a list of arrays
body: <p>I have a list(or array) consist of <code>n</code> arrays. Each array carries an arbitrary subset of integers from <code>0</code> to <code>n-1</code> (numbers are not repeated within an array). An example for <code>n=3</code> is:</p>
  <pre><code>l = [np.array([0, 1]), np.array([0]), np.array([1, 2])]
  </code></pre>
  <p>I want to pick one single number from each array as its representative, such that no two arrays have the same representative and make a list of them in the same order as arrays. In other words, the numbers picked for arrays must be unique and the whole set of representatives, will be a permutation of numbers <code>0</code> to <code>n-1</code>. For above list, it would uniquely be:</p>
  <pre><code>representatives = [1, 0, 2]
  </code></pre>
  <p>There is a guarantee that such list of representatives exist for our list, but how do we find them. In case, there are more than one possible list of representatives, any one of them can be randomly selected.</p>