#K85987. Lexicographically Smallest Binary String
Lexicographically Smallest Binary String
Lexicographically Smallest Binary String
You are given a binary string \(S\) consisting only of characters '0' and '1'. You are allowed to perform at most one adjacent swap operation: choose one pair of adjacent characters \(S[i]\) and \(S[i+1]\) and swap them, or do nothing.
Your task is to find the lexicographically smallest string achievable. A string \(A\) is lexicographically smaller than \(B\) if in the first position where they differ, the character in \(A\) is smaller than the corresponding character in \(B\).
For example, if \(S = "110"\), swapping the characters at indices 0 and 1 yields "101", which is lexicographically smaller than the original string.
inputFormat
The input consists of a single line containing a binary string \(S\) (a string that only contains the characters '0' and '1').
outputFormat
Output the lexicographically smallest binary string possible after performing at most one adjacent swap operation on \(S\).
## sample0
0
</p>