#include #include #include #include #include #include #include #define LL long long #define MAXN 100010 using namespace std; string s1; int len,k,fg,cnt,ans,fg2; int main(){ int T,cas,i; scanf("%d",&T); getchar(); for(cas=1;cas<=T;cas++) { char s2[MAXN]; getline(cin,s1); len=s1.length(); fg=0; for(i=0;i