#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e2 + 5;
const int INF = 0x3f3f3f3f;
const int MOD = 998244353;
char t[MAXN], s[MAXN];
int main() {
  int _;
  scanf("%d", &_);
  while (_--) {
    scanf("%s", t + 1);
    int n = strlen(t + 1);
    bool same = true;
    for (int i = 2; i <= n; ++i) {
      if (t[i] != t[i - 1]) {
        same = false;
      }
    }
    if (same) {
      printf("%s\n", t + 1);
      continue;
    }
    for (int i = 1; i <= n; ++i) {
      printf("10");
    }
    printf("\n");
  }
  return 0;
}
