#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
int 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;
    string ans;
    if (n1 == 0 && n2 == 0) {
      n0++;
      while (n0 > 0) {
        ans += '0';
        n0--;
      }
      cout << ans << "\n";
      continue;
    }
    if (n0 == 0 && n1 == 0) {
      n2++;
      while (n2 > 0) {
        ans += '1';
        n2--;
      }
      cout << ans << "\n";
      continue;
    }
    n0++;
    while (n0 > 0) {
      ans += '0';
      n0--;
    }
    n2++;
    while (n2 > 0) {
      ans += '1';
      n2--;
    }
    n1--;
    long long cnt = 0;
    while (n1 > 0) {
      if (cnt % 2)
        ans += '1';
      else
        ans += '0';
      n1--;
      cnt++;
    }
    cout << ans << "\n";
  }
  return 0;
}
