#include <bits/stdc++.h>
using namespace std;
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << "=" << h << "\n";
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << "=" << h << ",";
  _dbg(sdbg + 1, a...);
}
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  os << "[";
  for (auto vv : V) os << vv << ",";
  return os << "]";
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n0, n1, n2;
    scanf("%d %d %d", &n0, &n1, &n2);
    string ret;
    if (n0 == 0 && n1 == 0) {
      for (int i = 1; i <= n2 + 1; i++) ret += "1";
      printf("%s\n", ret.c_str());
      continue;
    }
    ret = "0";
    while (n0 > 0) {
      n0--;
      ret += "0";
    }
    int par = 0;
    while (n1 > 0) {
      n1--;
      ret += par == 0 ? "1" : "0";
      if (ret.back() == '1') {
        while (n2 > 0) {
          ret += "1";
          n2--;
        }
      }
      par ^= 1;
    }
    printf("%s\n", ret.c_str());
  }
  return 0;
}
