#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << '\n';
  err(++it, args...);
}
long long powMod(long long x, long long y) {
  long long p = 1;
  while (y) {
    if (y % 2) {
      p = (p * x) % ((long long)1e9 + 7);
    }
    y /= 2;
    x = (x * x) % ((long long)1e9 + 7);
  }
  return p;
}
long long invMod(long long x) { return powMod(x, ((long long)1e9 + 7) - 2); }
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long CpowMod(long long x, long long y, long long w) {
  long long p = 1;
  while (y) {
    if (y % 2) {
      p = (p * x) % w;
    }
    y /= 2;
    x = (x * x) % w;
  }
  return p;
}
void solve() {
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, c;
    cin >> a >> b >> c;
    if (a) a++;
    if (c) c++;
    for (long long i = 0; i <= a - 1; i++) {
      cout << "0";
    }
    if (c && a) b--;
    for (long long i = 0; i <= c - 1; i++) {
      cout << "1";
    }
    long long last = 1;
    if (!a && b) {
      if (!c) {
        cout << "01";
        b--;
      }
    }
    if (a && !c) last = 0;
    for (long long i = 0; i <= b - 1; i++) {
      cout << (!last);
      last = !last;
    }
    cout << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
