#include <bits/stdc++.h>
using namespace std;
long long nxt() {
  long long x;
  cin >> x;
  return x;
}
void solve(long long test_number) {
  string t;
  cin >> t;
  const long long n = t.size();
  char frst = t[0];
  bool pos = true;
  for (long long i = 0; i < n; ++i)
    if (t[i] != frst) pos = false;
  if (pos)
    cout << t << endl;
  else {
    for (long long i = 0; i < n; ++i) cout << "10";
    cout << endl;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(10);
  cout << fixed;
  long long t = 1;
  cin >> t;
  for (long long i = 0; i < t; ++i) {
    solve(i);
  }
}
