#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    int n = s.size();
    int ct0 = 0, ct1 = 0;
    for (int i = 0; i < n; i++) {
      if (s[i] == '0') {
        ct0++;
      } else {
        ct1++;
      }
    }
    if (ct0 >= 1 && ct1 >= 1) {
      for (int i = 0; i < n; i++) {
        cout << 10;
      }
    } else {
      cout << s;
    }
    cout << endl;
  }
  return 0;
}
