#include <bits/stdc++.h>
using namespace std;
void solve() {
  int T;
  cin >> T;
  while (T--) {
    int n1;
    cin >> n1;
    int n2;
    cin >> n2;
    int n3;
    cin >> n3;
    if (n3 > 0) {
      if (n1)
        for (signed i = 0; i < n1 + 1; i++) cout << 0;
      for (signed i = 0; i < n3 + 1; i++) cout << 1;
      if (n1 > 0)
        for (signed i = 0; i < n2 - 1; i++) cout << (i & 1);
      else
        for (signed i = 0; i < n2; i++) cout << (i & 1);
    } else {
      if (n1) {
        for (signed i = 0; i < n1 + 1; i++) cout << 0;
        for (signed i = 0; i < n2; i++) cout << 1 - (i & 1);
      } else
        for (signed i = 0; i < n2 + 1; i++) cout << (i & 1);
    }
    cout << "\n";
  }
}
signed main(signed argc, char **argv) {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  if (argc > 1 && (string)argv[1] == "local") {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    solve();
    while (cin.peek() != EOF) {
      if (isspace(cin.peek()))
        cin.get();
      else {
        cout << '\n';
        solve();
      }
    }
  } else {
    solve();
  }
}
