#include <bits/stdc++.h>
using namespace std;
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n0, n1, n2;
    cin >> n0 >> n1 >> n2;
    if (!(n1 - 1)) {
      cout << "1";
      while (n2) cout << "1", n2--;
      cout << "0";
      while (n0) cout << "0", n0--;
      cout << "\n";
      continue;
    }
    if (!n1) {
      if (n0)
        n0++;
      else
        n2++;
      while (n0) cout << "0", n0--;
      while (n2) cout << "1", n2--;
      cout << "\n";
      continue;
    }
    if (n1 > 1) cout << "01", n1--;
    int cur = 0;
    while (n1 > 1) cout << cur, cur ^= 1, n1--;
    if (cur)
      while (n0) cout << "0", n0--;
    else
      while (n2) cout << "1", n2--;
    cout << cur;
    if (cur)
      while (n2) cout << "1", n2--;
    else
      while (n0) cout << "0", n0--;
    cout << "\n";
  }
  return 0;
}
