#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long SIZE = 100000;
const int INF = 0x3f3f3f3f;
const long long ll_INF = 0x3f3f3f3f3f3f3f3f;
const long double PI = acos(-1);
const long long MAXN = numeric_limits<long long>::max();
const long long MAX = 2000000;
void solve() {
  int n0, n1, n2;
  cin >> n0 >> n1 >> n2;
  if (n1 % 2 != 0) {
    for (long long i = 0; i < n0; i++) cout << "0";
    for (long long i = 0; i < (n1 + 1) / 2; i++) cout << "01";
    for (long long i = 0; i < n2; i++) cout << "1";
    cout << endl;
  } else {
    if (n2 > 0 && n0 > 0) {
      for (long long i = 0; i < n1 / 2; i++) cout << "01";
      for (long long i = 0; i < n2; i++) cout << "1";
      for (long long i = 0; i <= n0; i++) cout << "0";
      cout << endl;
    } else if (n2 > 0) {
      for (long long i = 0; i < n1 / 2; i++) cout << "10";
      for (long long i = 0; i <= n2; i++) cout << "1";
      cout << endl;
    } else if (n0 > 0) {
      for (long long i = 0; i <= n0; i++) cout << "0";
      for (long long i = 0; i < n1 / 2; i++) cout << "10";
      cout << endl;
    } else {
      for (long long i = 0; i <= n1; i++) {
        if (i % 2 == 0)
          cout << "1";
        else
          cout << "0";
      }
      cout << endl;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) solve();
  return 0;
}
