You are given a permutation p=[p_1, p_2, …, p_n] of integers from 1 to n. Let's call the number m (1 ≤ m ≤ n) beautiful, if there exists two indices l, r (1 ≤ l ≤ r ≤ n), such that the numbers [p_l, p_{l+1}, …, p_r] is a permutation of numbers 1, 2, …, m.

For example, let p = [4, 5, 1, 3, 2, 6]. In this case, the numbers 1, 3, 5, 6 are beautiful and 2, 4 are not. It is because:

  * if l = 3 and r = 3 we will have a permutation [1] for m = 1; 
  * if l = 3 and r = 5 we will have a permutation [1, 3, 2] for m = 3; 
  * if l = 1 and r = 5 we will have a permutation [4, 5, 1, 3, 2] for m = 5; 
  * if l = 1 and r = 6 we will have a permutation [4, 5, 1, 3, 2, 6] for m = 6; 
  * it is impossible to take some l and r, such that [p_l, p_{l+1}, …, p_r] is a permutation of numbers 1, 2, …, m for m = 2 and for m = 4. 



You are given a permutation p=[p_1, p_2, …, p_n]. For all m (1 ≤ m ≤ n) determine if it is a beautiful number or not.

Input

The first line contains the only integer t (1 ≤ t ≤ 1000) — the number of test cases in the input. The next lines contain the description of test cases.

The first line of a test case contains a number n (1 ≤ n ≤ 2 ⋅ 10^5) — the length of the given permutation p. The next line contains n integers p_1, p_2, …, p_n (1 ≤ p_i ≤ n, all p_i are different) — the given permutation p.

It is guaranteed, that the sum of n from all test cases in the input doesn't exceed 2 ⋅ 10^5.

Output

Print t lines — the answers to test cases in the order they are given in the input. 

The answer to a test case is the string of length n, there the i-th character is equal to 1 if i is a beautiful number and is equal to 0 if i is not a beautiful number.

Example

Input


3
6
4 5 1 3 2 6
5
5 3 1 2 4
4
1 4 3 2


Output


101011
11111
1001

Note

The first test case is described in the problem statement.

In the second test case all numbers from 1 to 5 are beautiful:

  * if l = 3 and r = 3 we will have a permutation [1] for m = 1; 
  * if l = 3 and r = 4 we will have a permutation [1, 2] for m = 2; 
  * if l = 2 and r = 4 we will have a permutation [3, 1, 2] for m = 3; 
  * if l = 2 and r = 5 we will have a permutation [3, 1, 2, 4] for m = 4; 
  * if l = 1 and r = 5 we will have a permutation [5, 3, 1, 2, 4] for m = 5. 
#include <bits/stdc++.h>
using namespace std;
using str = string;
using vli = vector<int>;
using vll = vector<long long int>;
using sli = set<int>;
using sll = set<long long int>;
using pli = pair<int, int>;
using pll = pair<long long int, long long int>;
using vpi = vector<pair<int, int>>;
using vpl = vector<pair<long long int, long long int>>;
using mpl = map<long long int, long long int>;
using qll = queue<long long int>;
using stl = stack<long long int>;
const double eps = 1e-9;
const int INF = 2000000000;
const long long int infLL = 9000000000000000000;
const long long int MOD = 1e9 + 7;
const double PI = 3.141592653589793238462643383279;
long long o_O = 0;
long long ceil(long long int x, long long int y) {
  return x / y + (x % y != 0);
}
int dx[] = {0, 0, +1, -1, +1, +1, -1, -1};
int dy[] = {+1, -1, 0, 0, +1, -1, +1, -1};
const int mX = 3e5 + 123;
long long int n, a[mX], k, mx, i, j;
bool b[mX];
sll s;
void case_i() {
  cin >> n;
  mx = 1;
  memset(b, false, sizeof(b));
  b[1] = true;
  s.clear();
  for (long long int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] == 1) k = i;
  }
  s.insert(a[k]);
  i = max(0ll, k - 1);
  j = min(n + 1, k + 1);
  while (s.size() < n) {
    if (i < 1)
      k = j, j = min(n + 1, ++j);
    else if (j > n)
      k = i, i = max(0ll, --i);
    else if (a[i] < a[j])
      k = i, i = max(0ll, --i);
    else
      k = j, j = min(n + 1, ++j);
    s.insert(a[k]);
    mx = max(mx, a[k]);
    if (mx == s.size()) b[mx] = true;
  }
  for (long long int i = 1; i <= n; i++) cout << b[i];
  std ::cout << '\n';
}
int32_t main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int _;
  std ::cin >> _;
  while (_--) case_i();
  return 0;
}
long long int _pow(long long int p, long long int q) {
  if (q == 0) return 1;
  return p * _pow(p, q - 1);
}
long long int pow_mod(long long int x, long long int n, long long int m,
                      long long int k = 1) {
  x %= m;
  while (n > 0) {
    if (n & 1) k = (k * x) % m;
    x = (x * x) % m;
    n >>= 1;
  }
  return k;
}
long long int mod_inverse(long long int n) { return pow_mod(n, MOD - 2, MOD); }
long long int factorial(long long int f) {
  if (f < 2) return 1;
  return f * factorial(f - 1);
}
bool is_prime(long long int n) {
  if (n <= 3 and n != 1) return 1;
  if (n % 2 == 0 or n % 3 == 0) return 0;
  for (long long int i = 5; i * i <= n; i += 6)
    if (n % i == 0 or n % (i + 2) == 0) return 0;
  return 1;
}
void sieve_prime_generator(long long int n, bool vis[],
                           vector<long long int>& prime) {
  prime.push_back(2);
  for (long long int i = 3; i <= n;
       (!vis[i]) ? prime.push_back(i), i += 2 : i += 2)
    if (!vis[i])
      for (long long int j = i * i; j <= n; vis[j] = true, j += (2 * i))
        ;
}
void prime_factorization(long long int n,
                         vector<pair<long long int, long long int>>& prime_fact,
                         vector<long long int>& prime, long long int k = 0) {
  prime_fact.clear();
  for (auto i : prime) {
    if (i * i > n) break;
    while (n % i == 0) n /= i, k++;
    if (k) prime_fact.push_back({i, k}), k = 0;
  }
  if (n > 1) prime_fact.push_back({n, 1});
}
void total_divisors(long long int a[], long long int n) {
  for (long long int i = 1; i * i <= n; i++)
    for (long long int j = i * i; j < n; j += i)
      if (j == i * i)
        a[j]++;
      else
        a[j] += 2;
}
void sum_of_divisors(long long int a[], long long int n) {
  for (long long int i = 1; i * i <= n; i++)
    for (long long int j = i * i; j < n; j += i)
      if (j == i * i)
        a[j] += i;
      else
        a[j] += i + j / i;
}
