#include <bits/stdc++.h>
using namespace std;
long long binpow(long long a, long long b, long long m) {
  a %= m;
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
long long xy(long long a, long long b, long long& x, long long& y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long x1, y1;
  int d = xy(b, a % b, x1, y1);
  x = y1;
  y = x1 - y1 * (a / b);
  return d;
}
void phi_1_to_n(int n) {
  vector<int> phi(n + 1);
  phi[0] = 0;
  phi[1] = 1;
  for (int i = 2; i <= n; i++) phi[i] = i;
  for (int i = 2; i <= n; i++) {
    if (phi[i] == i) {
      for (int j = i; j <= n; j += i) phi[j] -= phi[j] / i;
    }
  }
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n0, n1, n2;
    cin >> n0 >> n1 >> n2;
    string s = "";
    if (n0 != 0)
      for (int i = 0; i <= n0; i++) {
        s += "0";
      }
    if (n2 != 0)
      for (int i = 0; i <= n2; i++) {
        s += "1";
      }
    if (n0 != 0 && n2 != 0) {
      n1 -= 1;
    }
    int ch = 0;
    if (s.length() == 0) {
      s += "1";
      ch = 1;
    }
    if (ch == 0 && n2 == 0 && s.length() != 0 && n1 != 0) {
      s += "1";
      n1 -= 1;
    }
    for (int i = 1; i <= n1; i++) {
      if (i % 2) {
        s += "0";
      } else {
        s += "1";
      }
    }
    cout << s << "\n";
  }
}
