#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long minn = INT_MAX;
long long maxx = INT_MIN;
bool ispalin(string str) {
  long long l = 0;
  long long h = str.size() - 1;
  while (h > l) {
    if (str[l++] != str[h--]) return 0;
  }
  return 1;
}
void isprime() {
  long long n = 10000;
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (long long p = 2; p * p <= n; p++) {
    if (prime[p] == true)
      for (long long i = p * p; i <= n; i += p) prime[i] = false;
  }
}
long long numberOfDigits(long long n) {
  if (n == 1) return 1;
  long double d = (n * log10(1.6180339887498948)) - ((log10(5)) / 2);
  return ceil(d);
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  long long t = 1;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    vector<pair<long long, long long>> vp;
    vector<long long> a(n);
    minn = INT_MAX;
    maxx = INT_MIN;
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
      vp.push_back(make_pair(a[i], i + 1));
    }
    sort(vp.begin(), vp.end());
    for (long long i = 0; i < n; i++) {
      maxx = max(maxx, vp[i].second);
      minn = min(minn, vp[i].second);
      long long diff = maxx - minn;
      if (diff + 1 == vp[i].first)
        cout << "1";
      else
        cout << "0";
    }
    cout << "\n";
  }
  return 0;
}
