#include <bits/stdc++.h>
int main() {
  int t, n0, n1, n2;
  std::cin >> t;
  while (t--) {
    std::cin >> n0 >> n1 >> n2;
    if (n0) {
      std::cout << std::string(n0 + 1, '0');
      if (n1) {
        std::cout << std::string(n2 + 1, '1');
        int prev = 1;
        for (int i = 0; i < n1 - 1; ++i) {
          std::cout << (prev ^= 1);
        }
      }
    } else {
      std::cout << std::string(n2 + 1, '1');
      int prev = 1;
      for (int i = 0; i < n1; ++i) {
        std::cout << (prev ^= 1);
      }
    }
    std::cout << '\n';
  }
  return 0;
}
