#include <bits/stdc++.h>
int main() {
  int t, n, k;
  int i, j, num[200001];
  int left, right, flag, last;
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    last = 0;
    for (i = 1; i <= n; i++) {
      scanf("%d", &num[i]);
      if (num[i] == 1) k = i;
    }
    printf("1");
    left = k - 1;
    right = k + 1;
    for (j = 2; j <= n; j++) {
      if (left < 1) left = 1;
      if (right > n) right = n;
      int count = 1;
      flag = 0;
      while (count != j) {
        count = count + (right - left) - 2;
        while (num[left] <= j && left >= 1) {
          count++;
          left--;
        }
        flag++;
        while (num[right] <= j && right <= n) {
          right++;
          count++;
        }
        flag++;
        if (flag = 2) break;
      }
      if (count == j)
        printf("1");
      else
        printf("0");
    }
    printf("\n");
  }
  return 0;
}
