#include <bits/stdc++.h>
using namespace std;
void solve() {
  string s;
  cin >> s;
  string t = "";
  long long count = 0, co = 0;
  for (long long i = 0; i < s.length(); i++) {
    if (s[i] - '0' == 0) {
      co++;
    } else {
      count++;
    }
  }
  if (co == s.length() || count == s.length()) {
    cout << s;
  } else {
    for (long long i = 0; i < s.length(); i++) {
      cout << 10;
    }
  }
  cout << t;
}
int main() {
  long long t;
  cin >> t;
  for (long long i = 0; i < t; i++) {
    solve();
    cout << endl;
  }
}
