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. 
/*

https://fb.watch/2_f8UL2Jev/   watch this if you are facing rejections

***********************************************
Don't Copy template it might lead to palagarism
***********************************************
I only Believe on will of fire. 
*******************************
Work so hard, be so good that luck doesn't get a chance to decide the fate of your dreams.
*****************************************************************************************************
If you want to aim high, aim high Don't let that studying and grades consume you Just live life young.
*****************************************************************
If I'm the sun, you're the moon Because when I go up, you go down
*****************************************
I'm working for the day I will surpass you
****************************************

*/ 
  
import java.util.*;
import java.awt.Point;
import java.lang.Math; 
import java.util.Arrays;
import java.util.Scanner;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.util.Comparator;
import java.math.BigInteger;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.stream.IntStream;
import java.io.IOException;
import java.util.ArrayList;
import java.math.BigInteger;
import java.util.Collections;
import java.util.StringTokenizer;
 
 public class S {
     
    public static void main(String[] args) throws java.lang.Exception {
        
		FastScanner in=new FastScanner();
	
        int t = in.ni();
        while(t-->0){
            int n = in.ni();
            int a[] = new int[n];
            for(int i=0;i<n;i++){
                int idx = in.ni()-1;
                a[idx]=i;
            }
            StringBuilder sb = new StringBuilder();
            sb.append("1");
            int min = a[0];
            int max = a[0];
            for(int i=1;i<n;i++){
               min = Math.min(min,a[i]);
               max= Math.max(max,a[i]);
               sb.append(max-min==i?'1':'0');
            }
            System.out.println(sb.toString());
        }    
    }

    
    static class sortByFirst implements Comparator<Pair>{

        public int compare(Pair a, Pair b){
            return a.x - b.x;
        }
    }
    
    static class Pair {
        int x;
        int y;

        public Pair(int a, int b){
            this.x=a;
            this.y=b;
        }
    }
    

    // static File input = new File("./input0.txt"); 
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		
		int ni() {
			return Integer.parseInt(next());
		}
		void print(int a){
		     System.out.println(a);
        }
        void print(long a){
            System.out.println(a);
       }
		String n(){
		     return next();
        }
        
		void ps(String a) {
		        System.out.print(a);
		}
		void pls(String a) {
		        System.out.println(a);
		}
		int[] ria(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=ni();
			return a;
		}
		void pa(int [] a) {
			for (int i=0; i<a.length; i++)
		        System.out.print(a[i]+" ");
		}
	
		
	     void pla(int [] a) {
			for (int i=0; i<a.length; i++)
		        System.out.println(a[i]);
		}
		
		long nl() {
			return Long.parseLong(next());
		}
	}
 
	

    	
 
    public int factorial(int n) {
            int fact = 1;
            int i = 1;
           while(i <= n) {
             fact *= i;
             i++;
           }
            return fact;
    }
    
    

    public static long gcd(long x,long y)
    {
    	if(x%y==0)
    		return y;
    	else
    		return gcd(y,x%y);
    }
    public static int gcd(int x,int y)
    {
    	if(x%y==0)
    		return y;
    	else 
    		return gcd(y,x%y);
    }
    public static int abs(int a,int b)
    {
    	return (int)Math.abs(a-b);
    }
    public static long abs(long a,long b)
    {
    	return (long)Math.abs(a-b);
    }
    public static int max(int a,int b)
    {
    	if(a>b)
    		return a;
    	else
    		return b;
    }
    public static int min(int a,int b)
    {
    	if(a>b)
    		return b;
    	else 
    		return a;
    }
    public static long max(long a,long b)
    {
    	if(a>b)
    		return a;
    	else
    		return b;
    }
    public static long min(long a,long b)
    {
    	if(a>b)
    		return b;
    	else 
    		return a;
    }
     
     
    public static long pow(long n,long p,long m)
    {
    	 long  result = 1;
    	  if(p==0)
    	    return 1;
    	if (p==1)
    	    return n;
    	while(p!=0)
    	{
    	    if(p%2==1)
    	        result *= n;
    	    if(result>=m)
    	    result%=m;
    	    p >>=1;
    	    n*=n;
    	    if(n>=m)
    	    n%=m;
    	}
    	return result;
    }
    public static long pow(long n,long p)
    {
    	long  result = 1;
    	  if(p==0)
    	    return 1;
    	if (p==1)
    	    return n;
    	while(p!=0)
    	{
    	    if(p%2==1)
    	        result *= n;	    
    	    p >>=1;
    	    n*=n;	    
    	}
    	return result;
     
    }
     
    static long sort(int a[]){  
         int n=a.length;
    	int b[]=new int[n];	
    	return mergeSort(a,b,0,n-1);
         
    }
     
    static long mergeSort(int a[],int b[],long left,long right){
         long c=0;
         if(left<right){   
          long mid=left+(right-left)/2;
    	 c= mergeSort(a,b,left,mid);
    	 c+=mergeSort(a,b,mid+1,right);
    	 c+=merge(a,b,left,mid+1,right); 
         }	
    	return c;	 
    }
    static long merge(int a[],int  b[],long left,long mid,long right){
         long c=0;int i=(int)left;int j=(int)mid; int k=(int)left;
         while(i<=(int)mid-1&&j<=(int)right){ 
              if(a[i]<=a[j]){
                   b[k++]=a[i++]; 
              }
              else{ 
                   b[k++]=a[j++];c+=mid-i;
              }
         }
         
         while (i <= (int)mid - 1)   
                 b[k++] = a[i++]; 
         while (j <= (int)right)
                 b[k++] = a[j++];
         for (i=(int)left; i <= (int)right; i++) 
    	        a[i] = b[i];
    	        return c; 
         }
         
      static class InputReader extends BufferedReader {
        public InputReader(InputStream st) {
            super(new InputStreamReader(st));
        }
 
        public String readLine() {
            try {
                return super.readLine();
            } catch (IOException e) {
                return null;
            }
        }
 
        private int readByte() {
            try {
                return read();
            } catch (IOException e) {
                throw new RuntimeException();
            }
        }
 
        public int ni() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }
 
            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }


       
 
      
 
    } 
     
  } 