#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
pair<int, int> fib(int n) {
  if (n == 0) return {0, 1};
  auto p = fib(n >> 1);
  int c = p.first * (2 * p.second - p.first);
  int d = p.first * p.first + p.second * p.second;
  if (n & 1)
    return {d, c + d};
  else
    return {c, d};
}
long long fact(long long n) {
  long long res = 1;
  for (long long i = n; i >= 1; i--) (res *= i) %= mod;
  return (res % mod);
}
long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  for (long long i = 2; i <= sqrt(n); i++)
    if (n % i == 0) return false;
  return true;
}
vector<long long> segmentedSieve(long long L, long long R) {
  long long lim = sqrt(R);
  vector<bool> mark(lim + 1, false);
  vector<long long> primes;
  for (long long i = 2; i <= lim; ++i) {
    if (!mark[i]) {
      primes.emplace_back(i);
      for (long long j = i * i; j <= lim; j += i) mark[j] = true;
    }
  }
  vector<bool> isPrime(R - L + 1, true);
  for (long long i : primes)
    for (long long j = max(i * i, (L + i - 1) / i * i); j <= R; j += i)
      isPrime[j - L] = false;
  if (L == 1) isPrime[0] = false;
  vector<long long> realprime;
  for (int i = 0; i <= R - L; i++) {
    if (isPrime[i]) {
      realprime.emplace_back(i + L);
    }
  }
  return realprime;
}
bool isPalindrome(string s) {
  int l = 0;
  int h = s.size() - 1;
  while (h > l) {
    if (s[l++] != s[h--]) {
      return false;
    }
  }
  return true;
}
int ternarySearch(int l, int r, int key, int ar[]) {
  while (r >= l) {
    int mid1 = l + (r - l) / 3;
    int mid2 = r - (r - l) / 3;
    if (ar[mid1] == key) {
      return mid1;
    }
    if (ar[mid2] == key) {
      return mid2;
    }
    if (key < ar[mid1]) {
      r = mid1 - 1;
    } else if (key > ar[mid2]) {
      l = mid2 + 1;
    } else {
      l = mid1 + 1;
      r = mid2 - 1;
    }
  }
  return -1;
}
int binarySearch(int arr[], int l, int r, int x) {
  while (l <= r) {
    int m = l + (r - l) / 2;
    if (arr[m] == x) return m;
    if (arr[m] < x)
      l = m + 1;
    else
      r = m - 1;
  }
  return -1;
}
long long maxsubarraysum(long long *array, long long n) {
  long long best = 0, sum = 0;
  for (long long k = 0; k < n; k++) {
    sum = max(array[k], sum + array[k]);
    best = max(best, sum);
  }
  return best;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int x, y, z;
    cin >> x >> y >> z;
    if (y % 2 != 0) {
      for (int i = 0; i < x; i++) {
        cout << "0";
      }
      for (int i = 0; i < ((y / 2) + 1); i++) {
        cout << "01";
      }
      for (int i = 0; i < z; i++) {
        cout << "1";
      }
      cout << "\n";
    } else {
      for (int i = 0; i < z; i++) {
        cout << "1";
      }
      for (int i = 0; i < (y / 2); i++) {
        cout << "10";
      }
      for (int i = 0; i < x; i++) {
        cout << "0";
      }
      if (y == 0 && x == 0) {
        cout << "1";
      } else if (y == 0 && z == 0) {
        cout << "0";
      } else {
        cout << "1";
      }
      cout << "\n";
    }
  }
  return 0;
}
