#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    string str;
    cin >> str;
    size_t found1 = str.find('0');
    size_t found2 = str.find('1');
    if (found1 == string::npos)
      cout << str << endl;
    else if (found2 == string ::npos)
      cout << str << endl;
    else {
      for (int i = 0; i < str.length(); i++) {
        cout << 10;
      }
      cout << endl;
    }
  }
  return 0;
}
