Given a string S consisting of lowercase Latin Letters. Find the first non repeating character in S.
The first line contains T denoting the number of testcases. Then follows description of testcases.
Each case begins with a single integer N denoting the length of string. The next line contains the string S.
For each testcase, print the first non repeating character present in string. Print -1 if there is no non repeating character.
1 <= T <= 900
1 <= N <= 104
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.