Permutations with repetitions