#include <bits/stdc++.h>
using namespace std;
void solve(){
int a,b;
cin>>a>>b;
string s;
cin>>s;
int n = s.length();
int cntodd = 0;
int cnteven = 0;
int hash[26] = {0};
for (int i = 0; i < s.size(); i++) {
hash[s[i] - 'a']++;
}
for (int i = 0; i < 26; i++) {
if(hash[i]%2 == 1) cntodd++;
}
cnteven = a - cntodd;
// if(cnteven<0){
// cnteven =0;
// }
cout<<cntodd<<" "<<cnteven<<endl;
}
int main() {
int t;
cin>>t;
while(t--){
solve();
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiAKdm9pZCBzb2x2ZSgpewoJaW50IGEsYjsKCWNpbj4+YT4+YjsKCXN0cmluZyBzOwoJY2luPj5zOwoJCglpbnQgbiA9IHMubGVuZ3RoKCk7CglpbnQgY250b2RkID0gMDsKCWludCBjbnRldmVuID0gMDsKCQoJaW50IGhhc2hbMjZdID0gezB9OwogICAgZm9yIChpbnQgaSA9IDA7IGkgPCBzLnNpemUoKTsgaSsrKSB7CiAgICAgICAgaGFzaFtzW2ldIC0gJ2EnXSsrOwogICAgfQoKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgMjY7IGkrKykgewogICAgICAgIGlmKGhhc2hbaV0lMiA9PSAxKSBjbnRvZGQrKzsKICAgICAgICAKICAgIH0KCQoJY250ZXZlbiA9IGEgLSBjbnRvZGQ7CgkvLyBpZihjbnRldmVuPDApewoJLy8gCWNudGV2ZW4gPTA7CgkvLyB9CgoJY291dDw8Y250b2RkPDwiICI8PGNudGV2ZW48PGVuZGw7Cn0KIAogCiAKIAppbnQgbWFpbigpIHsKCWludCB0OwoJY2luPj50OwoJd2hpbGUodC0tKXsKCQlzb2x2ZSgpOwoJfQoJcmV0dXJuIDA7Cn0=
MTQKMSAwCmEKMiAwCmFiCjIgMQpiYQozIDEKYWJiCjMgMgphYmMKNiAyCmJhY2FjZAo2IDIKZmFnYnphCjYgMgp6d2FhZmEKNyAyCnRhYWdhYWsKMTQgMwp0dHJyYWFra3R0b29ycgo1IDMKZGViZGIKNSA0CmVjYWRjCjUgMwpkZWJjYQo1IDMKYWJhYWMK
14
1 0
a
2 0
ab
2 1
ba
3 1
abb
3 2
abc
6 2
bacacd
6 2
fagbza
6 2
zwaafa
7 2
taagaak
14 3
ttrraakkttoorr
5 3
debdb
5 4
ecadc
5 3
debca
5 3
abaac