Given a string S consisting of uppercase and lowercase characters. The task is to sort uppercase and lowercase letters separately such that if the ith place in the original string had an Uppercase character then it should not have a lowercase character after being sorted and vice versa.

Input Format:
The first line of input contains an integer T denoting the number of test cases. The description of T test cases follows. The first line of each test case contains a single integer N denoting the length of string.
The second line contains a string S of length N, consisting of uppercase and lowercase characters.

Output Format:
For each testcase, in a new line, print the answer.

Your Task:
This is a function problem. You only need to complete the function caseSort that returns sorted string.

1 ≤ T ≤ 50
1 ≤ N ≤ 103



Testcase 1:
Sorted form of given string with the same case of character as that in original string.


** For More Input/Output Examples Use 'Expected Output' option **

Author: Ganesh Sawhney

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

Need help with your code? Please use, generate link and share the link here.

to report an issue on this page.