Permutations and combinations - Problem type 2