题目描述
Chef loves palindromes. Chef initially has odd number of charachters. Chef wants to create a palindrome of maximum even length using these characters.
For this Chef needs to discard one character. Help Chef find the character which needs to be discarded so that he can use the rest characters in any order to form a palindrome haivng maximum even length.
Input
An integer 'T' on first line denoting number of test cases
For each of the 'T' testcases, there are two lines
First line contains an integer 'N' denoting number of characters in list
Second line contains 'N' lowercase aphabetic characters which are not seperated by spaces
Output
For each of the 'T' test cases, display in a new line the character to be discarded
Constraints
N <= 12353
T <= 25
Example
Input:
2
7
abcbdca
3
abb
Output:
d
a
Explanation
'a' is a charcter that is repeated at index 0,6
'b' is a charcter that is repeated at index 1,3
'c' is a charcter that is repeated at index 2,5
'd' is a charcter that is only present at index 4
So, we need to remove 'd' so that we can get a palindrome having maximum possible even length.
similarly for 2nd test case "a" is the charcter to be discarded
输入格式
见题面
输出格式
见题面