#include <bits/stdc++.h>
using namespace std;
long long int mod = 1e9 + 7;
string answer = "";
void sol(string st, int a, int b, int c) {
  if (a == 0 and b == 0 and c == 0) {
    answer = st;
    return;
  }
  if (st.back() == '0' and a > 0) {
    sol(st + "0", a - 1, b, c);
  } else if (st.back() == '0' and b > 0) {
    sol(st + "1", a, b - 1, c);
  } else if (st.back() == '1' and c > 0) {
    sol(st + "1", a, b, c - 1);
  } else if (st.back() == '1' and b > 0) {
    sol(st + "0", a, b - 1, c);
  }
}
void solve() {
  int a, b, c;
  cin >> a >> b >> c;
  answer = "";
  sol("0", a, b, c);
  if (answer.empty() == false) {
    cout << answer << endl;
    return;
  }
  sol("1", a, b, c);
  cout << answer << endl;
  return;
}
int main() {
  int tt;
  cin >> tt;
  while (tt > 0) {
    solve();
    tt--;
  }
  return 0;
}
