Permutation of letters#843

Permutation of letters

1 second
128 megabytes
Very easy

Given a string consisting of symbols. Print all permutations of the symbols of the given string.

Input

A string consisting of (2 \le m \le 8) symbols. The symbols are Latin letters and digits.

Output

Print all permutations of the given string in lexicographical order.

Examples

Example 1

Loading
Loading