You are given an integer . You can take the first digit of this number and move it to the end of the number, leaving the order of the remaining digits unchanged. You are allowed to repeat this operation any number of times. Determine the maximum number that can be obtained as a result of such operations.
The input is presented as a single natural number (1 ≤ N ≤ 10^{10000}).
Output a single value – the largest number that can be obtained by performing such permutations.
Example 1
Initial number:
After the first permutation, we get:
Perform another permutation: