title: Cartesian products with n number of list
body: <p>I am having </p>
  
  <pre><code>List&lt;List&lt;string&gt;&gt; AllSimilarWordsLists { get; set; }
  </code></pre>
  
  <p>I want to generate string from these words such that no string is duplicate and Here duplicate means each and every string must contain unique words</p>
  
  <p>e.g if once generated 'How are you' then 'are you how' should not be considered in result'.</p>
  
  <p>I can have any number of list</p>
  
  <p>e.g</p>
  
  <pre><code>List1   List2   List3   List4   List5
  word11  word21  word21  word21  word51
  word12  word22  word22  word22  word52
  word13  word23  word23  word23  word53
  word14  word24  word24  word24  word54
  word15  word25  word25  word25  word55
  </code></pre>
  
  <p>These list are going to be added in AllSimilarWordsLists. I want to generate list of string using cartesian products . Have found <a href="https://stackoverflow.com/questions/4073713/is-there-a-good-linq-way-to-do-a-cartesian-product">this</a> but this solution is having fix number of lists, Anybody having ideas.</p>