#include <bits/stdc++.h>
using namespace std;
int n0, n1, n2;
void solve() {
  cin >> n0 >> n1 >> n2;
  string out = "";
  if (n1 || n2) {
    out += '1';
  } else {
    out += '0';
  }
  while (n0 || n1 || n2) {
    if (n2) {
      if (out[out.size() - 1] == '1') {
        n2--;
      } else {
        n1--;
      }
      out += '1';
    } else if (n0) {
      if (out[out.size() - 1] == '0') {
        n0--;
      } else {
        n1--;
      }
      out += '0';
    } else {
      if (out[out.size() - 1] == '1') {
        out += '0';
      } else {
        out += '1';
      }
      n1--;
    }
  }
  cout << out << endl;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
