generate permutations with repetition python