Problem: This week Arkady wanted to cook some pancakes (to follow ancient traditions) and make a problem about that. But then he remembered that one can't make a problem about stacking pancakes without working at a specific IT company, so he decided to bake the Napoleon cake instead.

To bake a Napoleon cake, one has to bake n dry layers first, and then put them on each other in one stack, adding some cream. Arkady started with an empty plate, and performed the following steps n times: 

  * place a new cake layer on the top of the stack; 
  * after the i-th layer is placed, pour a_i units of cream on top of the stack. 



When x units of cream are poured on the top of the stack, top x layers of the cake get drenched in the cream. If there are less than x layers, all layers get drenched and the rest of the cream is wasted. If x = 0, no layer gets drenched.

<image> The picture represents the first test case of the example.

Help Arkady determine which layers of the cake eventually get drenched when the process is over, and which don't.

Input

Each test contains multiple test cases. The first line contains the number of test cases t (1 ≤ t ≤ 20 000). Description of the test cases follows.

The first line of each test case contains a single integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the number of layers in the cake.

The second line of each test case contains n integers a_1, a_2, …, a_n (0 ≤ a_i ≤ n) — the amount of cream poured on the cake after adding each layer.

It is guaranteed that the sum of n over all test cases does not exceed 2 ⋅ 10^5.

Output

For each test case, print a single line with n integers. The i-th of the integers should be equal to 1 if the i-th layer from the bottom gets drenched, and 0 otherwise.

Example

Input


3
6
0 3 0 0 1 3
10
0 0 0 1 0 5 0 0 0 2
3
0 0 0


Output


1 1 0 1 1 1 
0 1 1 1 1 1 0 0 1 1 
0 0 0 

Solution (in JAVA):

Solution:

	import java.util.*;
	import java.lang.*;
	import java.io.*;
	import java.math.*;

    public	class practice{
		public static void main(String[] args){
			
			FastScanner inp = new FastScanner();
			int t = inp.nextInt(),n,arr[],done,j;
			boolean[] a;
			StringBuffer ans = new StringBuffer(""); 
			while(t-->0) {
				n = inp.nextInt();
				arr = inp.intArr(n);
				a = new boolean[n];
				done=0;
				for(int i=n-1;i>=0;i--) {
					done = Math.max(arr[i], done);
					if(done>0) {
						a[i] = true;
						done--;
					}
				}
				for(boolean x : a)
					ans.append(   (x?"1":0) +  " ");
				ans.append("\n");
			}	
			System.out.println(ans);
					
		}
		
		static ArrayList<ArrayList<Integer>> subsets(int n){
			//n=21 time = 1.5
			//n=20 time = 0.6
			//n=19 time = 0.4
			//n=18 time = 0.2
			//n=17 time = 0.1
			ArrayList<ArrayList<Integer>> arr = new ArrayList<>();
			ArrayList<Integer> just = new ArrayList<>();
			
			for(int i=1;i<=n;i++) just.add(i);
			arr.add(just);
			
			subsetsRecursiveFunc(arr,1,n,new ArrayList<Integer>());
			
			return arr;
		}
		protected static void subsetsRecursiveFunc(ArrayList<ArrayList<Integer>> arr, int k, int n, ArrayList<Integer> current) { 
			if(k== n+1) return;
			ArrayList<Integer> yo = new ArrayList<>(current);
			current.add(k);
			arr.add(yo);
			subsetsRecursiveFunc(arr,k+1,n,current);
			subsetsRecursiveFunc(arr,k+1,n,yo);
			
		}
		 
		static int gcd(int a, int b)
		{ 
		    if (a == 0)
		       return b*b;
		    if (b == 0)
		       return a*a;
		  
		 
		    if (a == b)
		        return a*a;
		  
		 
		    if (a > b)
		        return gcd(a-b, b);
		    return gcd(a, b-a);
		}
		
		static int lcm(int a, int b) {
			return (a*b)/gcd(a,b);
		}

		
		static boolean  isPrime(int n) {
			if(n <=1 )return false;
			if(n==2) return true;
			if(n%2==0) return false;
			for(int i=3;i<=Math.sqrt(n);i+=2)
				if(n%i==0) return false;
			return true;
		}
		static void inc(HashMap<Integer,Integer> map, int key) {
			if(map.containsKey(key))
				map.put(key, map.get(key) +1);
			else
				map.put(key, 1);
		}
		
		private static int countDigits(int l) {
				if (l >= 1000000000) return 10;
				if (l >= 100000000) return 9;
				if (l >= 10000000) return 8;
				if (l >= 1000000) return 7;
				if (l >= 100000) return 6;
				if (l >= 10000) return 5;
				if (l >= 1000) return 4;
				if (l >= 100) return 3;
				if (l >= 10) return 2;
				return 1;
			}
		private static int countDigits(long l) {
				if (l >= 1000000000000000000L) return 19;
				if (l >= 100000000000000000L) return 18;
				if (l >= 10000000000000000L) return 17;
				if (l >= 1000000000000000L) return 16;
				if (l >= 100000000000000L) return 15;
				if (l >= 10000000000000L) return 14;
				if (l >= 1000000000000L) return 13;
				if (l >= 100000000000L) return 12;
				if (l >= 10000000000L) return 11;
				if (l >= 1000000000L) return 10;
				if (l >= 100000000L) return 9;
				if (l >= 10000000L) return 8;
				if (l >= 1000000L) return 7;
				if (l >= 100000L) return 6;
				if (l >= 10000L) return 5;
				if (l >= 1000L) return 4;
				if (l >= 100L) return 3;
				if (l >= 10L) return 2;
				return 1;
			}

	}
		

	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[] intArr(int n) {
	    	int[] arr = new int[n];
	    	for(int i=0;i<n;i++)
	    		arr[i] = nextInt();
	    	return arr;
	    }
	    String[] StringArr(int n) {
	    	String[] arr = new String[n];
	    	for(int i=0;i<n;i++)
	    		arr[i] = next();
	    	return arr;
	    }
	    long[] longArr(int n) {
	    	long[] arr = new long[n];
	    	for(int i=0;i<n;i++)
	    		arr[i] = nextLong();
	    	return arr;
	    }
	    String nextLine()
	    {
	        String str = "";
	        try
	        {
	            str = br.readLine();
	        }
	        catch (IOException e)
	        {
	            e.printStackTrace();
	        }
	        return str;
	    }

	    int nextInt() {
	        return Integer.parseInt(next());
	    }
	    long nextLong() {
	        return Long.parseLong(next());
	    }
	}