#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n1, n2, n3;
  cin >> n1 >> n2 >> n3;
  if (n1 == 0 && n2 == 0 && n3 != 0) {
    n3++;
    while (n3--) cout << 1;
    cout << "\n";
    return;
  }
  if (n1 != 0 && n2 == 0 && n3 == 0) {
    n1++;
    while (n1--) cout << 0;
    cout << "\n";
    return;
  }
  int k = n3 + 1;
  while (k--) cout << 1;
  k = n1 + 1;
  while (k--) cout << 0;
  if (n2 == 1) {
    cout << "\n";
    return;
  }
  cout << 1;
  if (n2 == 2) {
    cout << "\n";
    return;
  }
  n2 -= 2;
  k = n2 / 2;
  while (k--) cout << "01";
  if (n2 % 2) cout << 0;
  cout << "\n";
}
int main() {
  int t = 1;
  cin >> t;
  while (t--) solve();
  return 0;
}
