#include <bits/stdc++.h>
using namespace std;
long long max(long long a, long long b) { return a > b ? a : b; }
long long min(long long a, long long b) { return a < b ? a : b; }
double max(double a, double b) { return a > b ? a : b; }
double min(double a, double b) { return a < b ? a : b; }
long long modd(long long a) {
  if (a < 0LL) return a * -1LL;
  return a;
}
double modd(double a) {
  if (a < 0.0) return a * -1.0;
  return a;
}
long long modulo(long long a) { return a % 1000000007LL; }
long long power(long long k, long long p) {
  if (p == 0) return 1LL;
  long long P = power(k, p / 2LL);
  P = (P * P) % 1000000007LL;
  if (p % 2 == 1) P = (P * k) % 1000000007LL;
  return P;
}
struct p_str {
  long long x, y;
};
bool comp(p_str &a, p_str &b) {
  if (a.x == b.x) {
    return a.y > b.y;
  }
  return a.x < b.x;
}
void swap(long long &s1, long long &s2) {
  long long temp = s1;
  s1 = s2;
  s2 = temp;
}
long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
void solve() {
  long long n0, n1, n2;
  cin >> n0 >> n1 >> n2;
  string ans = "";
  if (n0 > 0) {
    ans = "0";
    for (long long i = 0; i < n0; i++) {
      ans += "0";
    }
  }
  if (n2 > 0) {
    if (ans.length() > 0) {
      n1--;
    }
    ans += "1";
    for (long long i = 0; i < n2; i++) {
      ans += "1";
    }
  }
  if (n1 > 0) {
    int f = 0;
    if (ans.length() > 0) {
      f = ans[ans.length() - 1] - '0';
      f = 1 - f;
    } else {
      ans = "1";
    }
    for (long long i = 0; i < n1; i++) {
      ans += string(1, f + '0');
      f = 1 - f;
    }
  }
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
