Generate all permutations when giving the numbers