#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int a, b, c, cou = 0;
    cin >> a >> b >> c;
    vector<int> v;
    if (a != 0) {
      for (int i = 0; i <= a; i++) v.push_back(0);
    }
    if (b != 0) {
      if (b % 2 != 0 && v.size() != 0) {
        for (int i = 0; i <= b - 1; i++) {
          if (i % 2 == 0)
            v.push_back(1);
          else
            v.push_back(0);
        }
      } else if (b % 2 == 0 && v.size() == 0) {
        for (int i = 0; i <= b; i++) {
          if (i % 2 == 0)
            v.push_back(1);
          else
            v.push_back(0);
        }
      } else if (b % 2 != 0 && v.size() == 0) {
        cou++;
        for (int i = 0; i <= b - 1; i++) {
          if (i % 2 == 0)
            v.push_back(1);
          else
            v.push_back(0);
        }
      } else if (b % 2 == 0 && v.size() != 0) {
        cou++;
        for (int i = 0; i < b - 1; i++) {
          if (i % 2 == 0)
            v.push_back(1);
          else
            v.push_back(0);
        }
      }
    }
    if (c != 0) {
      if (v.size() == 0) {
        c = c;
      } else if (v.back() == 0) {
        c = c;
      } else if (v.back() == 1)
        c = c - 1;
      for (int i = 0; i <= c; i++) {
        v.push_back(1);
      }
    }
    if (cou > 0) {
      v.push_back(0);
    }
    for (int i = 0; i < v.size(); i++) cout << v[i];
    cout << endl;
  }
}
