#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long t = 1;
  cin >> t;
  while (t--) {
    long long n2, n1, n0;
    cin >> n0 >> n1 >> n2;
    string s;
    if (n0 != 0) {
      for (long long i = 0; i <= n0; i++) {
        s = s + "0";
      }
    }
    if (n2 != 0) {
      for (long long i = 0; i <= n2; i++) {
        s = s + "1";
      }
    }
    if (n0 > 0 && n2 > 0) n1--;
    long long i = 0;
    if (n0 == 0 && n2 == 0) n1++;
    if (n0 > 0 && n2 == 0) i = 1;
    while (n1 > 0) {
      if (i & 1)
        s = s + "1";
      else
        s = s + "0";
      n1--;
      i++;
    }
    cout << s << "\n";
  }
  return 0;
}
