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. 

import java.io.*;
import static java.lang.Double.*;
import static java.lang.Math.*;
import java.util.*;
import static javafx.scene.input.KeyCode.S;
public class Mao {
static Reader  in=new Reader();
static long ans,sum,mz=0,mx=(long) (pow(10,9)+7);
static int a[],b[][];
static StringBuilder sd=new StringBuilder();
    public static void main(String [] args) {
     int t=in.nextInt();
     while(t-->0){
     int n=in.nextInt(),x=0;
     int a[]=in.arr(n),ans[]=new int[n+1],max=0,min=n+1;
     ans[1]=1;ans[n]=1;
     int  map[]=new int[n+1];
     for(int i=0;i<n;i++){
         map[(a[i])]=( i+1);
     if(a[i]==1){x=1;min=i+1;max=i;break;}
     
     }
     for(int i=max;i<n;i++){
         map[a[i]]=( i+1);
         boolean B=false;
     while(x+1<n&&map[x+1]>0){
         
     ++x;
     min=min(map[x],min);
         
     if(i+1-(min-1)==x){ans[x]=1;}
     }
     
     }
     for(int i=0;i<n;i++){sd.append(ans[i+1]);}
     sd.append("\n");
     }
        System.out.print(sd);
      }
   static class Reader 
    { 
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public Reader() { this(System.in); }public Reader(InputStream is) { mIs = is;} 
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];} 
        public String nextLine(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isEndOfLine(c));return res.toString() ;} 
        public String s(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isSpaceChar(c));return res.toString();} 
        public long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long res = 0; do{ if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read();}while(!isSpaceChar(c));return res * sgn;} 
        public int nextInt(){int c = read() ;while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }int res = 0;do{if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read() ;}while(!isSpaceChar(c));return res * sgn;} 
        public double d() throws IOException {return Double.parseDouble(s()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } 
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; } 
        public int[] arr(int n){int[] ret = new int[n];for (int i = 0; i < n; i++) {ret[i] = nextInt();}return ret;}
    }
    
}
class node implements Comparable<node> {
    int x;
    String S;
    node(int x,String S){
    this.x=x;
    this.S=S;}

    
    @Override
    public int compareTo(node o) {
        return x-o.x;}
}
class Sorting{
 
 public static int[] bucketSort(int[] array, int bucketCount) {
 
 if (bucketCount <= 0) throw new IllegalArgumentException("Invalid bucket count");
 
 if (array.length <= 1) return array; //trivially sorted
 
 
 
 int high = array[0];
 
 int low = array[0];
 
 for (int i = 1; i < array.length; i++) { //find the range of input elements
 
 if (array[i] > high) high = array[i];
 
 if (array[i] < low) low = array[i];
 
 }
 
 double interval = ((double)(high - low + 1))/bucketCount; //range of one bucket
 
 
 ArrayList<Integer> buckets[] = new ArrayList[bucketCount];
 
 for (int i = 0; i < bucketCount; i++) { //initialize buckets
 
 buckets[i] = new ArrayList();
 
 }
 
 
 
 for (int i = 0; i < array.length; i++) { //partition the input array
 
 buckets[(int)((array[i] - low)/interval)].add(array[i]);
 
 }
 
 
 int pointer = 0;
 
 for (int i = 0; i < buckets.length; i++) {
 
 Collections.sort(buckets[i]); //mergeSort
 
 for (int j = 0; j < buckets[i].size(); j++) { //merge the buckets
 
 array[pointer] = buckets[i].get(j);
 
 pointer++;
 
 }
 
}
 
return array;
 
}
 
}
class Segment_Tree{
    long n,a[];
    long seg[],lazy[];
    Segment_Tree(int n,long a[]){
        this.n=n;
        lazy=new long[4*n];
    this.a=a;
    seg=new long[n*4];
    build(1,0,n-1);
    }
        void build(int p,int s,int e) {
        if(s==e) {
            seg[p] = a[s];
            return;
        }
        
        build(2*p,s,(s+e)/2);
        build(2*p+1,(s+e)/2+1,e);
        
        seg[p] = min(seg[2*p], seg[2*p+1]);
    }
    
        void update(int p,int s,int e,int i,int v) {
        if(s==e) {
            seg[p] = v;
            return;
        }
        
        
        if(i<=(s+e)/2) update(2*p,s,(s+e)/2,i,v);
        else update(2*p+1,(s+e)/2+1,e,i,v);
        
        seg[p] = min(seg[2*p],seg[2*p+1]);
    }
        void check(int p,int s,int e) {
        if(lazy[p]!=0) {
            seg[p] += lazy[p];
            if(s!=e) {
                lazy[2*p] += lazy[p];
                lazy[2*p+1] += lazy[p];
            }
            lazy[p] = 0;
        }
    }
    void update(int p,int s,int e,int a,int b,int v) {
        check(p,s,e);
        
        if(s>=a && e<=b) {
            seg[p] += v;
            
            if(s!=e) {
                lazy[2*p] += v;
                lazy[2*p+1] += v;
            }
            
            return;
        }
        
        if(s>b || e<a)
            return;
        
        update(2*p,s,(s+e)/2,a,b,v);
        update(2*p+1,(s+e)/2+1,e,a,b,v);
        
        seg[p] = min(seg[2*p],seg[2*p+1]);
    }
    
        long get(int p,int s,int e,int a,int b) {
        check(p,s,e);
        
        if(s>=a && e<=b)
            return seg[p];
        
        if(s>b || e<a)
            return Integer.MAX_VALUE; 
        
        return min(get(2*p,s,(s+e)/2,a,b), get(2*p+1,(s+e)/2+1,e,a,b));
    }
}