#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n0, n1, n2;
  cin >> n0 >> n1 >> n2;
  string res = "";
  if (n1 == 0) {
    if (n0 > 0) {
      for (long long int i = 0; i < n0 + 1; ++i) cout << '0';
      cout << '\n';
    } else {
      for (long long int i = 0; i < n2 + 1; ++i) cout << '1';
      cout << '\n';
    }
    return;
  }
  for (long long int i = 0; i < n0 + 1; ++i) res += '0';
  for (long long int i = 0; i < n2 + 1; ++i) res += '1';
  for (long long int i = 0; i < n1 - 1; ++i) res += (i % 2 == 0 ? '0' : '1');
  cout << res << '\n';
}
int32_t main() {
  long long int tst;
  cin >> tst;
  while (tst--) solve();
}
