How can I generate the shortest sequence with contains all possible permutations? Example: For length 2 the answer is 121, because this list contains 12 and 21, which are all possible permutations.