You are given a string S that represents a number. This string consists of the following characters only:
You can perform the following operation:
Your task is to determine the smallest number that can be formed by using the provided operation. You can perform this operation any number of times (possibly zero).
Note: Assume 1 based indexing.
Input format
Output format
For each test case, print a string representing the smallest number that can be formed in a new line.
Constraints
1≤T≤101≤|S|≤105
For the first test case:
For the second test case: