Given a string consisting of M (2 ≤ M ≤ 8) of distinct characters (letters and numbers). Need to bring all permutations of this string of characters in alphabetical order.
In the first line of the file is the source string.
Output in each line of the file for one permutation.