#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long c00, c01, c11;
    cin >> c00 >> c01 >> c11;
    if (c01 > 0) {
      string ans = "1";
      for (long long i = 1; i <= c11; i++) ans += '1';
      ans += '0';
      c01--;
      for (long long i = 1; i <= c00; i++) ans += '0';
      for (long long i = 1; i <= c01; i++) ans += (char)(i % 2 + '0');
      cout << ans << "\n";
    } else {
      if (c00 > 0)
        for (long long i = 1; i <= c00 + 1; i++) cout << 0;
      else
        for (long long i = 1; i <= c11 + 1; i++) cout << 1;
      cout << "\n";
    }
  }
  return 0;
}
