#include <bits/stdc++.h>
using namespace std;
int t, n1, n2, n0;
int main() {
  cin >> t;
  while (t--) {
    scanf("%d %d %d", &n0, &n1, &n2);
    if ((n0 != 0) && (n1 == 0 && n2 == 0)) {
      for (int i = 1; i <= n0 + 1; i++) {
        printf("0");
      }
      printf("\n");
      continue;
    } else if ((n2 != 0) && (n1 == 0 && n0 == 0)) {
      for (int i = 1; i <= n2 + 1; i++) {
        printf("1");
      }
      printf("\n");
      continue;
    } else {
      for (int i = 1; i <= n0 + 1; i++) {
        printf("0");
      }
      for (int i = 1; i <= n2 + 1; i++) {
        printf("1");
      }
      n1--;
      int k = 1;
      for (int i = 1; i <= n1; i++) {
        printf("%d", !k);
        k = !k;
      }
      printf("\n");
    }
  }
}
