#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n0, n1, n2;
    cin >> n0 >> n1 >> n2;
    string temp = "";
    if (n0 != 0) {
      temp += "0";
      while (n0 != 0) {
        n0--;
        temp += "0";
      }
    }
    char la = 'A';
    if (temp.length() != 0) {
      la = temp[temp.length() - 1];
    }
    while (n1 != 0) {
      if (la == 'A') {
        temp += "0";
        la = '0';
      }
      temp += "1";
      n1--;
      while (n2 != 0) {
        n2--;
        temp += "1";
      }
      if (n1 != 0) {
        temp += "0";
        n1--;
      }
    }
    char l = 'A';
    if (temp.length() != 0) {
      l = temp[temp.length() - 1];
    }
    if (n2 != 0) {
      if (l == 'A') {
        temp += "1";
      } else if (l == '0') {
        temp += "1";
      }
      while (n2--) {
        temp += "1";
      }
    }
    cout << temp << endl;
  }
  return 0;
}
