#include <iostream>
#include <map>
#include <string>
using namespace std;
int main()
{
int n;
cin>>n;
while(n--)
{
map<char, int> count;
map<char, int>::iterator iter;
int m;
string temp;
cin>>m>>temp;
for(int i=0; i<temp.length(); i++)
{
iter=count.find(temp[i]);
if(iter==count.end() )
{
count[temp[i]]=1;
}
else
{
count[temp[i]]=iter->second+1;
}
}
}
return 0;
}