#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 10;
const long long int INF = 2e18 + 10;
const int Mod = 1e6;
const int MAXN = 1000010;
const int N = 1e5 + 10;
const int M = 1e3 + 10;
const int M1 = 1e9 + 7;
const int M2 = 1e9 + 9;
const int base = 131;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  for (int ii = 1; ii <= t; ii++) {
    int x, y, z;
    cin >> x >> y >> z;
    if ((y + 1) % 2 == 0) {
      for (int i = 1; i <= x; i++) cout << "0";
      for (int i = 1; i <= (y + 1) / 2; i++) cout << "01";
      for (int i = 1; i <= z; i++) cout << "1";
      cout << endl;
    } else {
      if (y > 0) {
        for (int i = 1; i <= x; i++) cout << "0";
        for (int i = 1; i <= y / 2; i++) cout << "01";
        for (int i = 1; i <= z; i++) cout << "1";
        cout << "0";
      } else {
        for (int i = 1; i <= x + 1 && x > 0; i++) cout << "0";
        for (int i = 1; i <= z + 1 && z > 0; i++) cout << "1";
      }
      cout << endl;
    }
  }
  return 0;
}
