Bob is working as a data scientist, which basically means he stares at big integers all day. Bob loves big integers, and loves making them as big as possible. He is currently staring at an integer
Constraints
All digits of
Subtask 1 [2/15]
Subtask 2 [6/15]
Subtask 3 [7/15]
No additional constraints.
Input Specification
The first line contains an integer
The second line contains a
Output Specification
Output the largest integer Bob can create by swapping at most one pair of adjacent digits of
Sample Input 1
Copy
20
32249178991231416774
Sample Output 1
Copy
32429178991231416774
Sample Input 2
Copy
5
54321
Sample Output 2
Copy
54321
Comments