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;
const long double PI = (long double)(3.1415926535897932384626433832795);
int parity_check(int n) {
  int par = n;
  par = par ^ (par >> 1);
  par = par ^ (par >> 2);
  par = par ^ (par >> 4);
  par = par ^ (par >> 8);
  par = par ^ (par >> 16);
  if (par % 2 == 1) {
    return 1;
  } else {
    return 0;
  }
}
int lcs(string X, string Y, int m, int n) {
  int L[m + 1][n + 1];
  int i, j;
  for (i = 0; i <= m; i++) {
    for (j = 0; j <= n; j++) {
      if (i == 0 || j == 0)
        L[i][j] = 0;
      else if (X[i - 1] == Y[j - 1])
        L[i][j] = L[i - 1][j - 1] + 1;
      else
        L[i][j] = max(L[i - 1][j], L[i][j - 1]);
    }
  }
  return L[m][n];
}
int long long gcd(int long long a, int long long b) {
  if (a == 0) {
    return b;
  }
  return gcd(b % a, a);
}
int long long lcm(int long long a, int long long b) {
  int long long pro = a * b;
  int long long ans = gcd(a, b);
  pro = pro / ans;
  return pro;
}
int long long fast_power(int long long a, int long long b, int long long p) {
  if (b == 0) {
    return (1 % p);
  }
  int long long t = fast_power(a, b / 2, p);
  int long long ans = (t * t) % p;
  if (b % 2) {
    ans = (ans * (a % p)) % p;
  }
  return ans;
}
bool prime_check(int long long n) {
  int long long i, j;
  if (n == 1) {
    return false;
  }
  for (i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
int long long fact(int long long n, int long long mod) {
  int long long prod = 1;
  for (int long long i = 1; i <= n; i++) {
    prod = (prod * i) % mod;
  }
  return prod;
}
void dfs(int long long s, int long long d,
         vector<pair<int long long, int long long> > v[], bool visited[],
         int long long *max, int long long *maxcount, int long long min,
         int long long count) {
  visited[s] = true;
  if (s == d) {
    if ((*max) < min) {
      (*max) = min;
      (*maxcount) = count;
    } else if ((*max) == min) {
      if ((*maxcount) < count) {
        (*maxcount) = count;
      }
    }
  } else {
    for (int long long i = 0; i < v[s].size(); i++) {
      if (!visited[v[s][i].first]) {
        if (min > v[s][i].second) {
          min = v[s][i].second;
        }
        dfs(v[s][i].first, d, v, visited, max, maxcount, min, count + 1);
      }
    }
  }
  visited[s] = false;
}
void polygonArea(int long long X[], int long long Y[], int long long n,
                 int long long dp[]) {
  int long long area = 0;
  int long long j = n - 1;
  for (int long long i = 0; i < n; i++) {
    area += (X[j] + X[i]) * (Y[j] - Y[i]);
    dp[i + 1] = area;
    j = i;
  }
}
void mera_sieve() {
  bool prime[6000013];
  memset(prime, true, sizeof(prime));
  for (int long long p = 2; p * p <= 6000012; p++) {
    if (prime[p] == true) {
      for (int long long i = p * p; i <= 6000012; i += p) prime[i] = false;
    }
  }
  for (int long long i = 2; i <= 6000012; i++) {
    if (prime[i]) {
    }
  }
}
string rev(string str) {
  string r = "";
  for (int i = str.length() - 1; i >= 0; i--) {
    r += str[i];
  }
  return r;
}
bool palindrome(string str) {
  int n = str.length();
  for (int i = 0; i < str.length(); i++) {
    if (str[i] != str[n - 1 - i]) {
      return false;
    }
  }
  return true;
}
int equal(vector<string> v1, vector<string> v2) {
  if (v1.size() != v2.size()) {
    return 0;
  }
  for (int i = 0; i < v1.size(); i++) {
    if (v1[i] != v2[i]) {
      return 0;
    }
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int test, n, i, j;
  cin >> test;
  while (test--) {
    cin >> n;
    int arr[n + 1];
    map<int, int> ma;
    for (i = 1; i <= n; i++) {
      cin >> arr[i];
      ma[arr[i]] = i;
    }
    int pmax = ma[1], pmin = ma[1];
    string str = "1";
    for (i = 2; i <= n; i++) {
      pmax = max(pmax, ma[i]);
      pmin = min(pmin, ma[i]);
      if (pmax - pmin + 1 == i) {
        str += "1";
      } else {
        str += "0";
      }
    }
    cout << str << "\n";
  }
  return 0;
}
