Pergunta de entrevista da empresa Amazon

Implement a function to print out all the permutations of an input string