#include <bits/stdc++.h>
int main() {
  int i, j, m, n0, n1, n2, t;
  scanf("%d", &t);
  for (i = 0; i < t; i++) {
    scanf("%d%d%d", &n0, &n1, &n2);
    if (n2 != 0)
      for (j = 1; j <= n2 + 1; j++) printf("1");
    if (n0 != 0)
      for (j = 1; j <= n0 + 1; j++) printf("0");
    if (n1 != 0) {
      if (n0 != 0 && n2 != 0) {
        if ((n1 - 1) % 2 == 0) {
          for (j = 1; j <= (n1 - 1) / 2; j++) {
            printf("10");
          }
          if (n1 == 2) printf("1");
        } else {
          for (j = 1; j <= (n1 - 1) / 2; j++) printf("10");
          if (n1 > 1) printf("1");
        }
      } else if (n2 == 0 && n0 != 0) {
        if (n1 % 2 == 0)
          for (j = 1; j <= n1 / 2; j++) printf("10");
        else {
          for (j = 1; j <= n1 / 2; j++) printf("10");
          printf("1");
        }
      } else if (n0 == 0 && n2 != 0) {
        if (n1 % 2 == 0)
          for (j = 1; j <= n1 / 2; j++) printf("01");
        else {
          for (j = 1; j <= n1 / 2; j++) printf("01");
          printf("0");
        }
      } else {
        if (n1 % 2 == 0) {
          for (j = 1; j <= n1 / 2; j++) printf("10");
          printf("1");
        } else {
          for (j = 1; j <= n1 / 2; j++) printf("10");
          printf("10");
        }
      }
    }
    printf("\n");
  }
  return 0;
}
