Write an algorithm to print all permutations of your name.
Implement permutations(name) to return all unique permutations of the input string in lexicographic order. Repeated characters must not produce duplicate permutations. Return a list of strings, including [""] when the input is empty.
def permutations(name):