C3 AI interview question

Write to program to print all permutations of a given input string.