#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long q;
  cin >> q;
  while (q--) {
    long long n0, n1, n2;
    cin >> n0 >> n1 >> n2;
    if (n1 == 0) {
      if (n0 != 0) {
        cout << string(n0 + 1, '0') << endl;
        continue;
      } else {
        cout << string(n2 + 1, '1') << endl;
        continue;
      }
    }
    string s;
    for (int i = 0; i < n1 + 1; i++) {
      if (i % 2 == 0)
        s = s + "1";
      else
        s = s + "0";
    }
    s.insert(1, string(n0, '0'));
    s.insert(0, string(n2, '1'));
    cout << s << endl;
  }
  return 0;
}
