You are given a alphanumeric string of length N, you have to sort the string in a way that output string contains alphabets where the input string has alphabets, and numbers where the input string has numbers. Alphabets and numbers must be sorted independently in increasing order.
Score = max(0, x), where x=(800−num of characters in code)8
INPUT:
first line of input contains a number t denoting number of test cases.
first line of each test case contains the alphanumeric string.
OUTPUT:
print the sorted string as specified above.
CONSTRAINTS:
1<=t<=10
10<=N<=105
Input string only contains UPPERCASE English Alphabets and numbers.