#include <bits/stdc++.h>
using namespace std;
struct SegTree {
  vector<int> tree;
  void build(vector<int> &a, int v, int l, int r) {
    if (l == r)
      tree[v] = a[l];
    else {
      int m = (l + r) / 2;
      build(a, 2 * v, l, m);
      build(a, 2 * v + 1, m + 1, r);
      tree[v] = tree[2 * v] + tree[2 * v + 1];
    }
  }
  void update(int pos, int val, int v, int l, int r) {
    if (l == r && l == pos)
      tree[v] = val;
    else if (l == r)
      return;
    else {
      int m = (l + r) / 2;
      if (pos <= m)
        update(pos, val, 2 * v, l, m);
      else
        update(pos, val, 2 * v + 1, m + 1, r);
      tree[v] = tree[2 * v] + tree[2 * v + 1];
    }
  }
  int sum(int q_l, int q_r, int v, int l, int r) {
    if (q_r < q_l) return 0;
    if (q_l == l && q_r == r)
      return tree[v];
    else {
      int m = (l + r) / 2;
      return sum(q_l, min(q_r, m), 2 * v, l, m) +
             sum(max(q_l, m + 1), q_r, 2 * v + 1, m + 1, r);
    }
  }
  void set_size(int n) { tree.resize(4 * n); }
};
inline void solve() {
  int q;
  cin >> q;
  while (q--) {
    int n;
    cin >> n;
    vector<pair<int, int> > v(n);
    for (int i = 0; i < (n); i++) {
      cin >> v[i].first;
      v[i].second = i + 1;
    }
    sort(v.begin(), v.end());
    string otv = "";
    set<int> s;
    long long sum = 0;
    for (int i = 0; i < (n); i++) {
      s.insert(v[i].second);
      sum += v[i].second;
      long long col = *(--s.end()) - *s.begin() + 1;
      long long ar = ((*s.begin() + *(--s.end())) * col) / 2;
      if (ar == sum)
        otv += '1';
      else
        otv += '0';
    }
    cout << otv << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
}
