Problems
Permutation of letters
Permutation of letters
Given a string consisting of $m$ symbols. Print all permutations of symbols for this string.
\InputFile
One string consisting of $m~(2 \le m \le 8)$ of symbols --- Latin letters and digits.
\OutputFile
Print all permutations for the given string in lexicographical order.
Input example #1
AB
Output example #1
AB BA