#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int a, b, c;
    cin >> a >> b >> c;
    string ans = {};
    if (a != 0) {
      for (int i = 0; i <= a; i++) ans.push_back('0');
    }
    if (c != 0) {
      for (int i = 0; i <= c; i++) ans.push_back('1');
    }
    if (b != 0) {
      char turn;
      if (c != 0 && a != 0) {
        b -= 1;
        turn = '0';
      } else if (c != 0 && a == 0)
        turn = '0';
      else
        turn = '1';
      if (a == 0 && c == 0) ans.push_back('0'), turn = '1';
      if (b != 0)
        for (int i = 0; i < b; i++) {
          ans.push_back(turn);
          if (turn == '0')
            turn = '1';
          else
            turn = '0';
        }
    }
    cout << ans << "\n";
  }
  return 0;
}
