#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n0, n1, n2;
  cin >> n0 >> n1 >> n2;
  int total = n0 + n1 + n2;
  string temp;
  for (int i = 0; i < n1 / 2; i++) {
    temp += "10";
  }
  if (n1 % 2 == 1 && n1 > 0) {
    temp += "10";
    for (int i = 0; i < n0; i++) {
      temp += "0";
    }
    for (int i = 0; i < n2; i++) {
      temp = "1" + temp;
    }
  } else if (n1 % 2 == 0 && n1 > 0) {
    for (int i = 0; i < n2; i++) {
      temp = "1" + temp;
    }
    for (int i = 0; i < n0; i++) {
      temp += "0";
    }
    temp += "1";
  } else if (n0 > 0) {
    for (int i = 0; i < n0 + 1; i++) temp += "0";
  } else if (n2 > 0) {
    for (int i = 0; i < n2 + 1; i++) {
      temp += "1";
    }
  }
  cout << temp << endl;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
