#include #include int main() { int n,i; scanf("%d",&n); while(n--) { char str[50],z,c; scanf("%s",str); z=strlen(str); for(i=0;i