#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
template <class A, class B, class C>
struct triple {
  A first;
  B second;
  C third;
  bool operator<(const triple &t) const {
    if (first != t.first) return first < t.first;
    if (second != t.second) return second < t.second;
    return third < t.third;
  }
};
const long double EPS = 0.000000001;
const long double INFD32 = 1000000000;
const long long INF64 = 1000000000000000000;
const long long INF32 = 1000000000;
const long long one = 1;
bool iss_ll(long long __1, long long __2) { return 2 * INF64 / __1 >= __2; }
bool equal(double _1, double _2) { return (abs(_1 - _2) < EPS); }
bool iss_sqr(long long &__1) {
  long long __2 = sqrt((long double)__1);
  return __2 * __2 == __1;
};
bool iss_prime(long long __1) {
  for (long long i = 2; i * i <= __1; ++i)
    if (!(__1 % i)) return 0;
  return 1;
}
long long gcd(long long __1, long long __2) {
  while (__1 && __2)
    if (__1 > __2)
      __1 = __1 % __2;
    else
      __2 = __2 % __1;
  return __1 + __2;
}
long long lcm(long long __1, long long __2) {
  return __1 * __2 / (gcd(__1, __2));
}
long long sq_cube(long long x) {
  if (x == 0) return 1;
  long long l = 0, r = 2e6;
  while (l + 1 < r) {
    long long m = (l + r) / 2;
    if (m * m * m > x)
      r = m;
    else
      l = m;
  }
  return l;
}
long long bp(long long a, long long b, long long md) {
  long long res = 1;
  while (b) {
    if (b & 1) res *= a;
    a *= a;
    a %= md;
    res %= md;
    b >>= 1;
  }
  return res;
}
long long inv(long long x, long long md) { return bp(x, md - 2, md); }
void update_by_mod(long long &x, long long md) {
  x %= md;
  if (x < 0) x += md;
}
void update_by_mod(long long &x, long long &y, long long md) {
  update_by_mod(x, md);
  update_by_mod(y, md);
}
void update_by_mod(long long &x, long long &y, long long &z, long long md) {
  update_by_mod(x, md);
  update_by_mod(y, md);
  update_by_mod(z, md);
}
void update_by_mod(long long &x, long long &y, long long &z, long long &a,
                   long long md) {
  update_by_mod(x, md);
  update_by_mod(y, md);
  update_by_mod(z, md);
  update_by_mod(a, md);
}
vector<long long> z_function(string &s) {
  long long n = ((long long)((s).size()));
  vector<long long> ans(n, 0);
  long long l = 0, r = 0;
  for (long long i = 1; i < n; ++i) {
    ans[i] = min(r - i + 1, ans[i - l]);
    while (ans[i] + i < n && s[ans[i]] == s[i + ans[i]]) {
      ++ans[i];
    }
    if (i + ans[i] - 1 > r) {
      l = i, r = i + ans[i] - 1;
    }
    r = max(r, i);
  }
  return ans;
}
template <class T>
T sqr(T x) {
  return x * x;
}
long long cn[10100];
long long arr[500500];
void solve() {
  long long n0, n1, n2;
  cin >> n0 >> n1 >> n2;
  string ans;
  if (n0 > 0) {
    ans += "0";
    for (long long i = 1; i <= n0; ++i) ans += "0";
  }
  if (n2 > 0) {
    ans += "1";
    for (long long i = 1; i <= n2; ++i) ans += "1";
  }
  if (n2 && n0) n1--;
  if (ans.empty()) {
    ans.push_back('1');
  }
  for (long long i = 1; i <= n1; ++i) {
    if (ans.back() == '0')
      ans.push_back('1');
    else
      ans.push_back('0');
  }
  cout << ans << "\n";
}
signed main(void) {
  srand(time(0));
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  cin >> t;
  for (long long i = 1; i <= t; ++i) {
    solve();
  }
  return 0;
}
