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.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;


public class wef {
public static class FastReader {
	BufferedReader br;
	StringTokenizer st;
	//it reads the data about the specified point and divide the data about it ,it is quite fast
	//than using direct 

	public FastReader() {
		br = new BufferedReader(new InputStreamReader(System.in));
	}

	String next() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (Exception r) {
				r.printStackTrace();
			}
		}
		return st.nextToken();
	}

	int nextInt() {
		return Integer.parseInt(next());//converts string to integer
	}

	double nextDouble() {
		return Double.parseDouble(next());
	}

	long nextLong() {
		return Long.parseLong(next());
	}

	String nextLine() {
		String str = "";
		try {
			str = br.readLine();
		} catch (Exception r) {
			r.printStackTrace();
		}
		return str;
	}
}
static ArrayList<String>list1=new ArrayList<String>();
static void combine(String instr, StringBuffer outstr, int index,int k)
{
	if(outstr.length()==k)
	{
		list1.add(outstr.toString());return;
	}
	if(outstr.toString().length()==0)
	outstr.append(instr.charAt(index));
    for (int i = 0; i < instr.length(); i++)
    {
        outstr.append(instr.charAt(i));
       
        combine(instr, outstr, i + 1,k);
        outstr.deleteCharAt(outstr.length() - 1);
    }
   index++;
} 
static ArrayList<ArrayList<Integer>>l=new ArrayList<>();
static void comb(int n,int k,int ind,ArrayList<Integer>list)
{
	if(k==0)
	{
		l.add(new ArrayList<>(list));

		return;
	}
	
	
	for(int i=ind;i<=n;i++)
	{
		list.add(i);
		comb(n,k-1,ind+1,list);
		
		list.remove(list.size()-1);
		
	}
	
	
	
	
	

}
static long sum(long n)
{
	long sum=0;
	while(n!=0)
	{
		sum+=n%10;
		n/=10;
	}
	return sum;
}


static boolean check(HashMap<Integer,Integer>map)
{
	for(int h:map.values())
		if(h>1)
			return false;
	return true;
}

static class Pair implements Comparable<Pair>{
    int x;int y;
    Pair(int x,int y){
        this.x=x;
        this.y=y;
      //  this.i=i;
    }
	@Override
	public int compareTo(Pair o) {
		// TODO Auto-generated method stub
		return x-o.x;
		
	}
}
static long ncr(long n, int k) 
{ long m=(long)1e9+7;
    long C[] = new long[k + 1]; 
     
    // nC0 is 1 
    C[0] = 1;   
   
    for (int i = 1; i <= n; i++) 
    { 
        // Compute next row of pascal  
        // triangle using the previous row 
        for (int j = Math.min(i, k); j > 0; j--) 
            C[j] = (C[j]%m + C[j-1]%m)%m; 
    } 
    return C[k]%m; 
} 
static boolean isPrime(int n) 
{ 
    // Corner cases 
    if (n <= 1) 
        return false; 
    if (n <= 3) 
        return true; 
  
    // This is checked so  
    // that we can skip 
    // middle five numbers 
    // in below loop 
    if (n % 2 == 0 ||  
        n % 3 == 0) 
        return false; 
  
    for (int i = 5; 
             i * i <= n; i = i + 6) 
        if (n % i == 0 || 
            n % (i + 2) == 0) 
            return false; 
  
    return true; 
} 
static long pow(long a, long n, long mod) {
	//		a %= mod;
	long ret = 1;
	int x = 63 - Long.numberOfLeadingZeros(n);
	for (; x >= 0; x--) {
		ret = ret * ret % mod;
		if (n << 63 - x < 0)
			ret = ret * a % mod;
	}
	return ret;
}



static int maxsum=0;
static long dp[]=new long[100000];
static long recur(int a[],int ind,int tempsum)
 {
	 if(ind>=a.length)
	 {//System.out.println(tempsum);
		 if(maxsum==0)
			 maxsum=tempsum;
		 else
		 maxsum=Math.max(maxsum, tempsum);
		 return maxsum;
	 }
	 if(dp[ind]!=-1)
		 return dp[ind];
	 
	// System.out.println(tempsum);
	 int ct=0;
	 for(int i=ind;i<ind+(a.length-ind)/2;i++)
	 {ct++;
//	 if(ind+ct<a.length)
	 {	 tempsum+=a[i];
		 
		dp[i]= recur(a,ind+(2*ct),tempsum);}
		 
	 }
	 
	 return dp[ind];
 }
 static int gcd(int a,int b)
 {
	 if(b==0)
		 return a;
	 return gcd(b,a%b);
 }
 static int lcm(int a,int b)
 {
	 return (a*b)/gcd(a,b);
 }
 
  static int power(int n,int pow)
  {
	  if(pow==1)
		  return n;
	  else if(pow%2==0)
	  {
		  return power(n*n,pow/2);
	  }
	  else
		  return n*power(n*n,pow/2);
  }
 
 
 static HashSet<Long> factorize(long n) {
	    HashSet<Long> facts=new HashSet<Long>();
	    for (long i = 2; i * i <= n; ++i) {
	        while (n % i == 0) {
	            facts.add(i);
	            n /= i;
	        }
	    }
	 
	    if (n != 1) {
	        facts.add(n);
	    }
	    return facts;
	}
 static int count;static boolean vis[];
 static void dfs(ArrayList a[],boolean vis[],int v)
 {
	 if(vis[v]==true)
		 return;
	 
	 vis[v]=true;
	 count++;
	 for(Object h:a[v])
	 {
		 if(vis[(int) h]==false)
		 {
			 dfs(a,vis,(int)h);
		 }
	 }
	 
 }
 static int find(int parent[],int a)
 {
	 if(parent[a]!=a)
		 parent[a]= find(parent,parent[a]);
	 return parent[a];
 }
 
public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));

	public static void main(String[] args) {
		// TODO Auto-generated method stub
	FastReader in=new FastReader();
	TreeMap<Long,Integer>map=new TreeMap<Long,Integer>();
	ArrayList<Long>list=new ArrayList<Long>();
//	HashSet<Integer>set=new HashSet<Integer>();
	HashSet<Integer>set=new HashSet<Integer>();
	Deque<Integer>qu=new LinkedList<Integer>();
	
		
	
	int t=in.nextInt();
	while(t-->0)
	{
		int n=in.nextInt();
		int a[]=new int[n+1];
		for(int i=1;i<=n;i++)
		{
			int y=in.nextInt();
			a[y]=i;
		}
		StringBuilder sb=new StringBuilder();
		int max=Integer.MIN_VALUE;
		int min=Integer.MAX_VALUE;
		for(int i=1;i<=n;i++)
		{
			 max=Math.max(max, a[i]);
			 min=Math.min(min, a[i]);
			 
			 if(max-min+1==i)
				 sb.append(1);
			 else
				 sb.append(0);
		}
		out.println(sb);out.flush();
		
	}
	out.flush();
	
	
	
	}
	
 }
