#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
long long int lcm(long long int a, long long int b) {
  return a * (b / gcd(a, b));
}
void solve() {}
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int a, b, c;
    cin >> a >> b >> c;
    if (a == 0 && b == 0) {
      for (long long int i = 0; i <= c; i++) cout << 1;
    } else if (b == 0 && c == 0) {
      for (long long int i = 0; i <= a; i++) cout << 0;
    } else if (a == 0 && c == 0) {
      for (long long int i = 0; i <= b; i++) {
        if (i & 1)
          cout << 0;
        else
          cout << 1;
      }
    } else {
      b--;
      for (long long int i = 0; i <= a; i++) cout << 0;
      for (long long int i = 0; i <= c; i++) cout << 1;
      for (long long int i = 0; i < b; i++) {
        if (i & 1)
          cout << 1;
        else
          cout << 0;
      }
    }
    cout << "\n";
  }
}
