#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int T;
  cin >> T;
  while (T--) {
    string s;
    cin >> s;
    string ans = "";
    for (auto i = 0; i < (s.size()); i++) {
      if (i == 0 || (i & 1)) ans += s[i];
    }
    cout << ans << "\n";
  }
}
