#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n0, n1, n2;
    cin >> n0 >> n1 >> n2;
    if (n1 == 0 && n2 == 0) {
      cout << string(n0 + 1, '0') << endl;
      continue;
    }
    string result = string(n2 + 1, '1');
    char turn = '0';
    while (n1--) {
      result += turn;
      if (turn == '0') {
        turn = '1';
      } else {
        turn = '0';
      }
    }
    if (result[result.size() - 1] == '0') {
      result += string(n0, '0');
    } else {
      result = result.substr(0, result.size() - 1);
      result = result + string(n0, '0') + "1";
    }
    cout << result << endl;
  }
  return 0;
}
