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;
pair<long long int, long long int> p[200005];
class Myfirst {
 private:
  string *name;
  long long int *age;

 public:
  long long int gcd(long long int a, long long int b) {
    if (b == 0) return a;
    a %= b;
    return gcd(b, a);
  }
  long long int exte_gcd(long long int a, long long int b, long long int &x,
                         long long int &y) {
    if (b == 0) {
      x = 1;
      y = 0;
      return a;
    }
    long long int x1, y1;
    long long int d = exte_gcd(b, a % b, x1, y1);
    x = y1;
    y = x1 - y1 * (a / b);
    return d;
  }
  long long int powe(long long int d, long long int s) {
    if (s == 1)
      return d;
    else if (s == 0)
      return 1;
    else {
      long long int u, v = d;
      for (u = 1; u < s; u++) d = d * v;
      return d;
    }
  }
  long long int count_divisors(long long int b) {
    long long int i, count = 0, n = 1;
    for (i = 2; i * i <= b; i++) {
      count = 0;
      if (b % i == 0) {
        while (b % i == 0) {
          b = b / i;
          count++;
        }
        n = n * (count + 1);
      }
    }
    if (b > 1) n = 2 * n;
    return n;
  }
  long long int bigmod(long long int a, long long int b, long long int mod) {
    if (b == 0) return 1;
    long long int x = bigmod(a, b / 2, mod);
    x = (x * x) % mod;
    if (b % 2) x = (x * a) % mod;
    return x;
  }
  long long int phi(long long int n) {
    double result = n;
    for (long long int p = 2; p * p <= n; ++p) {
      if (n % p == 0) {
        while (n % p == 0) n /= p;
        result *= (1.0 - (1.0 / (double)p));
      }
    }
    if (n > 1) result *= (1.0 - (1.0 / (double)n));
    return (long long int)result;
  }
  void solve() {
    long long int t;
    cin >> t;
    while (t--) {
      long long int n, i;
      cin >> n;
      for (i = 0; i < n; i++) {
        cin >> p[i].first;
        p[i].second = i + 1;
      }
      sort(p, p + n);
      long long int mx = p[0].second;
      long long int mn = p[0].second;
      for (i = 0; i < n; i++) {
        mx = max(mx, p[i].second);
        mn = min(mn, p[i].second);
        if (mx - mn + 1 == i + 1)
          cout << 1;
        else
          cout << 0;
      }
      cout << endl;
    }
  }
};
int main() {
  Myfirst *prg = new Myfirst();
  prg->solve();
}
