#include <bits/stdc++.h>
using namespace std;
const int nax = 100000 + 10;
long long int n, arr[nax];
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    int len = (int)s.length();
    int zero = 0;
    int one = 0;
    for (auto x : s) {
      if (x == '0')
        zero++;
      else
        one++;
    }
    if (zero == 0 || one == 0) {
      cout << s << endl;
      continue;
    }
    string t = "10";
    for (int i = 1; i <= len; i++) cout << t;
    cout << endl;
  }
  return 0;
}
