#include <bits/stdc++.h>
using namespace std;
long long **mat;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n0, n1, n2;
    cin >> n0 >> n1 >> n2;
    string ans = "0";
    for (long long i = 0; i < n0; i++) {
      ans += '0';
    }
    if (n0 == 0) ans = "";
    if (n1 != 0 && n0 == 0) ans = "0";
    if (n1 % 2 == 0 && n1 != 0) {
      ans = '1' + ans;
      n1--;
    }
    long long a = 1;
    for (long long i = 0; i < n1; i++) {
      ans += a + '0';
      a ^= 1;
    }
    if (ans[ans.size() - 1] != '1' && n2 != 0) ans += '1';
    for (long long i = 0; i < n2; i++) {
      ans += '1';
    }
    cout << ans << "\n";
  }
}
