Partition into Permutations

CodeChef - PERMPART