This recursively prints all the permutations of the input.