/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
int t
= Integer.
parseInt(bf.
readLine()); while(t-->0){
int l = 0; int r = 0; int p = 1;
int res = 0;
for(int i = 0, j = s.length()-1; i<=j; i++,j--){
l = (l*p + s.charAt(i))%1000000009;
r = (r*p + s.charAt(j))%1000000009;
p *= 73;
p %= 1000000009;
if(l==r && i<j){
res += 2;
l = 0; r = 0; p = 1;
}
}
if(p != 1)
res++;
}
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCUJ1ZmZlcmVkUmVhZGVyIGJmID0gbmV3IEJ1ZmZlcmVkUmVhZGVyKG5ldyBJbnB1dFN0cmVhbVJlYWRlcihTeXN0ZW0uaW4pKTsKCQlpbnQgdCA9IEludGVnZXIucGFyc2VJbnQoYmYucmVhZExpbmUoKSk7CgkJd2hpbGUodC0tPjApewoJCQlTdHJpbmcgcyA9IGJmLnJlYWRMaW5lKCk7CgkJCWludCBsID0gMDsgaW50IHIgPSAwOyBpbnQgcCA9IDE7CgkJCWludCByZXMgPSAwOwoJCQlmb3IoaW50IGkgPSAwLCBqID0gcy5sZW5ndGgoKS0xOyBpPD1qOyBpKyssai0tKXsKCQkJCWwgPSAobCpwICsgcy5jaGFyQXQoaSkpJTEwMDAwMDAwMDk7CgkJCQlyID0gKH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