#include <iostream>
#include <string>
using namespace std;
int main(void)
{
int t;
cin >> t;
while (t--)
{
string a;
cin >> a;
for (int i = 0; i < a.length(); i += 2) //짝수 부분 출력
cout << a[i];
for (int i = 1; i < a.length(); i += 2) //홀수 부분 출력
cout << a[i];
cout << endl;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKHZvaWQpCnsKCWludCB0OwoJY2luID4+IHQ7Cgl3aGlsZSAodC0tKQoJewoJCXN0cmluZyBhOwoJCWNpbiA+PiBhOwoKCQlmb3IgKGludCBpID0gMDsgaSA8IGEubGVuZ3RoKCk7IGkgKz0gMikJCS8v7Ked7IiYIOu2gOu2hCDstpzroKUKCQkJY291dCA8PCBhW2ldOwoJCWZvciAoaW50IGkgPSAxOyBpIDwgYS5sZW5ndGgoKTsgaSArPSAyKQkJLy/tmYDsiJgg67aA67aEIOy2nOugpQoJCQljb3V0IDw8IGFbaV07CgkJY291dCA8PCBlbmRsOwoJfQp9