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