import java.io.*;
public class Main{
int t
=Integer.
parseInt(br.
readLine()); boolean a[];
for(int i=0;i<t;i++){
// a=new boolean[1001];
a=new boolean[n+1];
s=br.readLine();
int j=0;
while(j<=(s.length())/2){
j++;
}
j=1;
int done=1;
while(j<=n){
if(a[j]==false){
if(done==1){
a[j]=true;
done=0;
}else{
done=1;
}
}
j++;
}
j=1;
while(j<=n){
if(a[j]==false)
j++;
}
}
}
}
aW1wb3J0IGphdmEuaW8uKjsKcHVibGljIGNsYXNzIE1haW57CiAgICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB0aHJvd3MgSU9FeGNlcHRpb257CgkJQnVmZmVyZWRSZWFkZXIgYnI9bmV3IEJ1ZmZlcmVkUmVhZGVyKG5ldyBJbnB1dFN0cmVhbVJlYWRlcihTeXN0ZW0uaW4pKTsKCQlpbnQgdD1JbnRlZ2VyLnBhcnNlSW50KGJyLnJlYWRMaW5lKCkpOwoJCWJvb2xlYW4gYVtdOwoJCWZvcihpbnQgaT0wO2k8dDtpKyspewovLwkJCWE9bmV3IGJvb2xlYW5bMTAwMV07CgkJCVN0cmluZyBzPWJyLnJlYWRMaW5lKCk7CgkJCVN0cmluZyBzMVtdPXMuc3BsaXQoIiAiKTsKCQkJaW50IG49SW50ZWdlci5wYXJzZUludChzMVswXSk7CgkJCWludCBtPUludGVnZXIucGFyc2VJbnQoczFbMV0pOwoJCQlhPW5ldyBib29sZWFuW24rMV07CgkJCXM9YnIucmVhZExpbmUoKTsKCQkJU3RyaW5nIGRbXT1zLnNwbGl0KCIgIik7CgkJCWludCBqPTA7CgkJCXdoaWxlKGo8PShzLmxlbmd0aCgpKS8yKXsKCQkJCWFbSW50ZWdlci5wYXJzZUludChkW2pdKV09dHJ1ZTsKCQkJCWorKzsKCQkJfQoJCQlqPTE7CgkJCWludCBkb25lPTE7CgkJCXdoaWxlKGo8PW4pewoJCQkJaWYoYVtqXT09ZmFsc2UpewoJCQkJCWlmKGRvbmU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