I would like to combine and/or permute the words from a list up to 3 times. For example:
If I have one list with:
appleorangecafe
and another list with:
112233
it should produce combinations like:
11appleorange2233orange11cafe2211orangecafe3333apple1133
The logic is the word from any list can be repeated up to 3 times, no more. But in any order and any permutation. How can I achieve this?