Your program will be given an integer . Find the smallest number larger than consisting of the same digits as .
Input Specification
The first line of input contains the integer .
The first digit in will not be a zero.
Output Specification
Output the result on a single line. If there is no such number, output .
Sample Input 1
156
Sample Output 1
165
Sample Input 2
330
Sample Output 2
0
Sample Input 3
27711
Sample Output 3
71127
Comments