#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    if (!a && !b) {
      for (int i = 1; i <= c + 1; ++i) printf("1");
      printf("\n");
      continue;
    }
    if (!a && !c) {
      printf("10");
      --b;
      for (int i = 1; i <= b / 2; ++i) printf("10");
      if (b % 2) printf("1");
      printf("\n");
      continue;
    }
    if (!b && !c) {
      for (int i = 1; i <= a + 1; ++i) printf("0");
      printf("\n");
      continue;
    }
    for (int i = 1; i <= c + 1 && c; ++i) printf("1");
    if (!c) printf("1");
    --b;
    for (int i = 1; i <= b / 2 && b; ++i) printf("01");
    printf("0");
    for (int i = 1; i <= a && a; ++i) printf("0");
    if (b % 2) printf("1");
    printf("\n");
  }
  return 0;
}
