#include <bits/stdc++.h>
using namespace std;
const int mxn = 1e3 + 10;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long tt;
  cin >> tt;
  while (tt--) {
    int n0, n1, n2;
    cin >> n0 >> n1 >> n2;
    string ans, s0 = "0", s1 = "1", s01 = "10";
    if (!n1) {
      if (n0 > 0)
        for (long long i = 1; i < n0 + 2; i++) ans += s0;
      if (n2 > 0)
        for (long long i = 1; i < n2 + 2; i++) ans += s1;
    } else {
      n1--;
      if (n1 & 1) {
        ans += s1;
        n1--;
      }
      for (long long i = 1; i < n0 + 2; i++) ans += s0;
      for (long long i = 1; i <= n1 / 2; i++) ans += s01;
      for (long long i = 1; i < n2 + 2; i++) ans += s1;
    }
    cout << ans << "\n";
  }
  return 0;
}
