#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int mod2 = 1e9 + 9;
inline int pow_(long long a, int n, int p = mod) {
  int r = 1;
  while (n) {
    if (n & 1) r = r * a % p;
    n >>= 1;
    a = a * a % p;
  }
  return r;
}
int main(void) {
  int T;
  cin >> T;
  while (T--) {
    string s;
    cin >> s;
    int n = s.length();
    n *= 2;
    set<int> temp(s.begin(), s.end());
    int distinct = (int)temp.size();
    char letter = s[0];
    if (distinct == 1) {
      cout << s << "\n";
    } else {
      for (int i = 0; i <= n - 1; i++) {
        cout << (i & 1);
      }
      printf("\n");
    }
  }
}
