#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
int solve() {
  int a, b, c, t(0);
  scanf("%d", &a);
  scanf("%d", &b);
  scanf("%d", &c);
  string s = "";
  if (!b) {
    if (a)
      for (int i = 0; i < a + 1; ++i) s += '0';
    if (c)
      for (int i = 0; i < c + 1; ++i) s += '1';
  } else {
    for (int i = 0; i < a + 1; ++i) s += '0';
    for (int i = 0; i < c + 1; ++i) s += '1';
    for (int i = 0; i < b - 1; ++i) s += '0' + t, t ^= 1;
  }
  return printf("%s\n", s.c_str());
}
int main() {
  int _;
  scanf("%d", &_);
  while (_--) solve();
}
