#include <bits/stdc++.h>
using namespace std;
int Set(int N, int pos) { return N = N | (1 << pos); }
int reset(int N, int pos) { return N = N & ~(1 << pos); }
bool check(int N, int pos) { return (bool)(N & (1 << pos)); }
inline int addmod(long long int x, long long int y) {
  return (x % 1000000007 + y % 1000000007) % 1000000007;
}
inline int submod(long long int x, long long int y) {
  return (x % 1000000007 - y % 1000000007 + 1000000007) % 1000000007;
}
inline int mulmod(long long int x, long long int y) {
  return (x % 1000000007 * y % 1000000007) % 1000000007;
}
inline int nextSubMask(int i, int mask) { return (i - 1) & mask; }
template <typename T>
void we_r_done(T mssg) {
  cout << mssg;
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    int n0, n1, n2;
    cin >> n0 >> n1 >> n2;
    string s;
    if (n1 == 0) {
      if (n2)
        for (int i = 0; i <= n2; i++) s += '1';
      if (n0)
        for (int i = 0; i <= n0; i++) s += '0';
    } else {
      for (int i = 0; i <= n2; i++) s += '1';
      for (int i = 0; i <= n0; i++) s += '0';
      n1--;
      for (char c = '1'; n1; n1--) {
        s += c;
        c = (c == '1' ? '0' : '1');
      }
    }
    cout << s << endl;
  }
  return 0;
};
