def toString(List): return \'\'.join(List) # The main function that recursively prints all repeated permutations of the given string. def allLexicographicRec