#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, c, i, j;
    cin >> a >> b >> c;
    string f, s, third;
    if (a) {
      s = string(a + 1, '0');
    }
    if (c) {
      f = string(c + 1, '1');
    }
    if (b) {
      bool flag;
      if (a == 0 && c) {
        flag = true;
        for (i = 0; i < b; i++) {
          if (flag) {
            third += '0';
            flag = false;
          } else {
            third += '1';
            flag = true;
          }
        }
        cout << f << third << endl;
        continue;
      }
      if (c) {
        b--;
      }
      flag = true;
      for (i = 0; i < b; i++) {
        if (flag) {
          third += '1';
          flag = false;
        } else {
          third += '0';
          flag = true;
        }
      }
      if (a == 0 && c == 0) {
        if (b & 1)
          third += '0';
        else
          third += '1';
      }
    }
    cout << f << s << third << endl;
  }
  return 0;
}
