
You are given a positive integer written as a string of digits. You may select a contiguous substring (consisting of one or more digits, possibly including the first or last digit), divide this substring into two non-empty parts, swap their order, and place them back in the original position. Your task is to find the maximum possible number obtainable by such a single operation.
The first line contains a single positive integer with at most digits.
Output the maximum number that can be obtained with this operation, or the original number if it cannot be increased.
Example 1