#include<bits/stdc++.h> #include<map> using namespace std; int main() { int n; while(~scanf("%d",&n)) { while(n--) { char a[10005]; scanf("%s",a); char*p=a; char temp=*p; p++; int cnt=1; while(*p!='
#include<bits/stdc++.h> #include<map> using namespace std; int main() { int n; while(~scanf("%d",&n)) { while(n--) { char a[10005]; scanf("%s",a); char*p=a; char temp=*p; p++; int cnt=1; while(*p!='