#include <bits/stdc++.h>
using namespace std;
void autocheck() {}
void fast() {
  cin.tie(NULL);
  cout.tie(NULL);
  ios_base::sync_with_stdio(false);
}
const int sz = 1e9 + 7;
int md2(int x, int y) { return ((x * y) % sz); }
int md3(int x, int y, int z) { return md2(x, md2(y, z)); }
int gcd(int n, int m) {
  int temp;
  while (m != 0) {
    temp = m;
    m = m % n;
    n = temp;
  }
  return n;
}
int fastm(int a, int b) {
  if (b == 0)
    return 1;
  else if (b % 2 == 1) {
    int temp = fastm(a, (b - 1) / 2);
    return md3(a, temp, temp);
  } else {
    int temp = fastm(a, b / 2);
    return md2(temp, temp);
  }
}
bool subArraySum(vector<int> &v, int n, int sum) {
  int curr_sum = v[0], start = 0, i;
  for (i = 1; i <= n; i++) {
    while (curr_sum > sum && start < i - 1) {
      curr_sum = curr_sum - v[start];
      start++;
    }
    if (curr_sum == sum && start != i - 1) {
      return true;
    }
    if (i < n) curr_sum = curr_sum + v[i];
  }
  return false;
}
int main() {
  autocheck();
  fast();
  int t = 1;
  cin >> t;
  while (t--) {
    int n0, n1, n2;
    cin >> n0 >> n1 >> n2;
    string s = "";
    if (n1 % 2 == 1) {
      for (int i = 0; i <= n1 / 2; i++) {
        s += "10";
      }
      for (int i = 0; i < n2; i++) {
        s = "1" + s;
      }
      for (int i = 0; i < n0; i++) {
        s += "0";
      }
    } else {
      for (int i = 0; i < n2; i++) {
        s += "1";
      }
      for (int i = 0; i < n1 / 2; i++) {
        s += "10";
      }
      for (int i = 0; i < n0; i++) {
        s += "0";
      }
      if (n1 == 0) {
        if (n2 != 0)
          s += '1';
        else if (n0 != 0)
          s += '0';
      } else
        s += '1';
    }
    cout << s << endl;
  }
}
