#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
const int M = 1e9 + 7;
const int MOD = 998244353;
const double PI = 3.141592653589793238460;
long long int power(long long int a, long long int b) {
  long long int res = 1;
  if (a == 0) return 0;
  if (a == 1) return 1;
  for (; b > 0; b >>= 1) {
    if (b & 1) res = (res * a);
    if (res > MOD) res %= MOD;
    a = (a * a);
    if (a > MOD) a = a % MOD;
  }
  return res;
}
bool isPrime[1000001];
vector<long long int> prime;
void seive(int limit) {
  isPrime[0] = isPrime[1] = 1;
  for (int i = 2; i * i <= limit; i++) {
    if (!isPrime[i])
      for (int j = i * i; j <= limit; j += i) {
        isPrime[j] = 1;
      }
  }
  for (int i = 2; i <= limit; i++)
    if (!isPrime[i]) prime.push_back(i);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0);
  int tt = 1;
  cin >> tt;
  while (tt--) {
    long long int n0, n1, n2;
    cin >> n0 >> n1 >> n2;
    if (!n1 and !n0) {
      string s = "";
      s += "1";
      while (n2--) s += "1";
      cout << s << "\n";
      continue;
    }
    if (n1 and n2 and n1 % 2 == 0) {
      string s = "";
      s += "0";
      while (n0--) s += "0";
      s += "1";
      while (n2--) s += "1";
      s += "0";
      n1 -= 2;
      while (n1) {
        s += "10";
        n1 -= 2;
      }
      cout << s << "\n";
      continue;
    }
    string s = "";
    s += "0";
    int mx = n1 / 2;
    while (mx--) s += "10";
    n1 %= 2;
    while (n0--) s += "0";
    if (n1) s += "1";
    if (n1 and n2)
      while (n2--) s += "1";
    else if (!n1 and n2) {
      s += "1";
      while (n2--) s += "1";
    }
    cout << s << "\n";
  }
}
