Choose One Element From Each Set Without Ordering
<p>Please consider the following code:</p>

<pre><code>List&lt;string&gt; a = new List&lt;string&gt;(new string[] { "a1", "a2" });
List&lt;string&gt; b = new List&lt;string&gt;(new string[] { "b1", "b2" });
List&lt;string&gt; c = new List&lt;string&gt;(new string[] { "c1", "c2" });
List&lt;List&lt;string&gt;&gt; input = new List&lt;List&lt;string&gt;&gt;();
input.Add(a);
input.Add(b);
input.Add(c);
List&lt;List&lt;string&gt;&gt; output=List&lt;List&lt;string&gt;&gt; PickOneFromEachSet(input)
</code></pre>

<p><code>PickOneFromEachSet</code> would pick an element from each set without considering the ordering. </p>

<p>We can have 2^3=8 combinations, i.e. the output would be</p>

<pre><code>{"a1","b1","c1"},
{"a1","b1","c2"},
...
{"a2","b2","c2"}
</code></pre>

<p>How should we construct such a function?</p>
