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