Permutations#837

Permutations

1 second
64 megabytes
Very easy

Given a string of (2 \leq M \leq 8) pairwise distinct characters (letters of the Latin alphabet and digits). Output all permutations of the characters of this string in alphabetical order.

Input

The first line contains the string.

Output

Output each permutation on a separate line.

Examples

Example 1

Loading
Loading