#include <bits/stdc++.h>
using namespace std;
int n;
const int MAXN = 2e5 + 7;
int arr[MAXN];
inline void init() {}
inline void solve() {
  for (int i = 0; i < n; i++) cin >> arr[i];
  int l = find(arr, arr + n, 1) - arr;
  int r = l;
  for (int i = 1; i <= n; i++) {
    while (l > 0 && arr[l - 1] <= i) --l;
    while (r + 1 < n && arr[r + 1] <= i) ++r;
    cout << (r - l + 1 == i);
  }
  cout << '\n';
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  while (cin >> n) solve();
}
