#include <bits/stdc++.h>
using namespace std;
void solve() {
  int a, b, c;
  cin >> a >> b >> c;
  string r = "", p = "", s = "";
  if (b == 0 && a == 0) {
    s.append(c + 1, '1');
    cout << s << "\n";
    return;
  }
  if (b == 0 && c == 0) {
    s.append(a + 1, '0');
    cout << s << "\n";
    return;
  }
  if (b & 1) {
    b += 1;
    b /= 2;
    while (b--) s += "01";
    while (c--) s += "1";
    while (a--) r += "0";
    r += s;
    cout << r << "\n";
  } else {
    s += "01";
    while (c--) s += "1";
    while (a--) r += "0";
    r += s;
    s = "";
    b /= 2;
    while (b--) s += "01";
    reverse(s.begin(), s.end());
    for (int i = 1; i < s.length(); i++) r += s[i];
    cout << r << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
