#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  for (long long int w1 = 0; w1 < t; w1++) {
    long long int a, b, c;
    cin >> a >> b >> c;
    string s;
    if (a == 0 && b == 0) {
      for (long long int i = 0; i < c + 1; i++) s.push_back('1');
      cout << s << endl;
      continue;
    }
    if (c == 0 && b == 0) {
      for (long long int i = 0; i < a + 1; i++) s.push_back('0');
      cout << s << endl;
      continue;
    }
    if (b == 1) {
      for (long long int i = 0; i < a + 1; i++) s.push_back('0');
      for (long long int i = 0; i < c + 1; i++) s.push_back('1');
      cout << s << endl;
      continue;
    }
    long long int q = b / 2;
    for (long long int i = 0; i < q; i++) {
      s.push_back('1');
      s.push_back('0');
    }
    for (long long int i = 0; i < a; i++) s.push_back('0');
    for (long long int i = 0; i < c + 1; i++) s.push_back('1');
    if (b % 2 != 0) s.push_back('0');
    cout << s << endl;
  }
  return 0;
}
