#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll N = 2e5 + 10;
const ll inf = 1e18;
const ll MOD = 1e9 + 100;
int n0, n1, n2;
int main() {
  int t;
  cin >> t;
  while (t--) {
    cin >> n0 >> n1 >> n2;
    if (n1 == 0) {
      if (n2)
        n2++;
      else
        n0++;
      while (n2--) printf("1");
      while (n0--) printf("0");
      printf("\n");
      continue;
    }
    if (n1 % 2 == 1) {
      while (n2--) printf("1");
      for (int i = 1; i <= n1 + 1; i++) {
        printf("%c", i % 2 + '0');
      }
      while (n0--) printf("0");
    } else {
      while (n2--) printf("1");
      for (int i = 1; i <= n1; i++) {
        printf("%c", i % 2 + '0');
      }
      while (n0--) printf("0");
      printf("1");
    }
    printf("\n");
  }
  return 0;
}
