#include <bits/stdc++.h>
using namespace std;
long long max(long long x, long long y) {
  if (x > y) return x;
  return y;
}
long long min(long long x, long long y) {
  if (x < y) return x;
  return y;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n0, n1, n2;
    cin >> n0 >> n1 >> n2;
    if (n0 == 0 && n2 == 0) {
      int prev = 1;
      cout << prev;
      for (int i = 0; i < n1; i++) {
        if (prev) {
          cout << 0;
          prev = 0;
        } else {
          cout << 1;
          prev = 1;
        }
      }
      cout << endl;
    } else {
      int prev = n2 == 0 ? 0 : 1;
      for (int i = 0; i < n2; i++) {
        cout << 1;
        prev = 1;
      }
      if (n2 > 0) cout << 1;
      for (int i = 0; i < n0; i++) {
        if (prev) {
          n1--;
        }
        cout << 0;
        prev = 0;
      }
      if (n0 > 0) cout << 0;
      for (int i = 0; i < n1; i++) {
        if (prev) {
          cout << 0;
          prev = 0;
        } else {
          cout << 1;
          prev = 1;
        }
      }
      cout << endl;
    }
  }
  return 0;
}
