#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int x, y, z;
    cin >> x >> y >> z;
    string s = "";
    if (y >= 1) {
      s.push_back('0');
      s.push_back('1');
      y--;
    }
    while (y > 1) {
      s.push_back('0');
      s.push_back('1');
      y -= 2;
    }
    if (s.empty()) s.push_back(z > x ? '1' : '0');
    while (z--) {
      s.push_back('1');
    }
    if (y == 1) s.push_back('0');
    while (x--) {
      cout << 0;
    }
    cout << s << endl;
  }
}
