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.
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.
For each testcase, in a new line, print the answer.
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.
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.