Question: How to get merge list of lists?

So given a list [ [ [1,2], [2,1] ], [ [3,4], [4,3] ], [ [5] ] ],

I would like to produce a list 

[ [1,2,3,4,5], [1,2,4,3,5], [2,1,3,4,5], [2,1,4,3,5] ]

 

so it makes a combination of sublist of every lists in the given list

is there a way to do it ?

 

Thanks,

Please Wait...