#include <bits/stdc++.h>
using namespace std;
const long long N = 1e9 + 7;
const long long NN = 1e7 + 7;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long n1, n2, n3;
    cin >> n1 >> n2 >> n3;
    if (n2 != 0) {
      for (__typeof(0) i = 0; i < n1 + 1; ++i) cout << "0";
      cout << "1";
      n2--;
      for (__typeof(0) i = 0; i < n3; ++i) cout << "1";
      for (__typeof(0) i = 0; i < n2 / 2; ++i) cout << "01";
      if (n2 % 2 != 0) cout << "0";
    } else {
      if (n1 > 0)
        for (__typeof(0) i = 0; i < n1 + 1; ++i) cout << "0";
      else
        for (__typeof(0) i = 0; i < n3 + 1; ++i) cout << "1";
    }
    cout << "\n";
  }
}
