Implement tool to print all permutations of a string.