#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 5;
const int M = 1e6;
const long long INF = (long long)(1e18);
const int inf = 1e9;
const long long MOD = 1000000007LL;
void solve() {
  int a, b, c;
  cin >> a >> b >> c;
  vector<int> ans;
  if (a) {
    for (int i = 0; i < a + 1; i++) {
      ans.push_back(0);
    }
  }
  if (c) {
    for (int i = 0; i < c + 1; i++) {
      ans.push_back(1);
    }
  }
  if (a && c) b--;
  if (!a && !c) b++;
  int now;
  if (ans.empty())
    now = 0;
  else
    now = ans.back() ^ 1;
  for (int i = 0; i < b; i++) {
    ans.push_back(now);
    now ^= 1;
  }
  for (auto c : ans) cout << c;
  cout << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int T;
  cin >> T;
  for (int i = 1; i <= T; i++) {
    solve();
  }
  return 0;
}
