#include <bits/stdc++.h>
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
constexpr long long MAX = 5100000;
constexpr long long INF = 1LL << 60;
constexpr int inf = 1000000007;
constexpr long long mod = 1000000007LL;
using namespace std;
void suzuken() {
  long long n[3];
  scanf("%lld %lld %lld", &n[0], &n[1], &n[2]);
  deque<char> dq;
  int cnt = 0;
  for (int i = 0; i < n[1]; i++) {
    if (i == 0) {
      dq.push_back('1');
      dq.push_back('0');
    } else if (dq.back() == '1')
      dq.push_back('0');
    else
      dq.push_back('1');
    cnt++;
  }
  bool ok = false;
  if (!dq.empty() and dq.back() == '1') {
    ok = true;
    dq.pop_back();
  }
  for (int i = 0; i < n[0]; i++) {
    if (dq.empty()) {
      dq.push_back('0');
    }
    dq.push_back('0');
  }
  if (ok) dq.push_back('1');
  for (int i = 0; i < n[2]; i++) {
    if (dq.empty()) dq.push_back('1');
    dq.push_front('1');
  }
  for (int i = 0; i < dq.size(); i++) {
    cout << dq[i];
  }
  cout << "\n";
}
int main() {
  int kkt;
  scanf("%d", &kkt);
  while (kkt--) {
    suzuken();
  }
  return 0;
}
