// Problem: B. Napoleon Cake
// Contest: Codeforces - Codeforces Round #707 (Div. 2, based on Moscow Open Olympiad in Informatics)
// URL: https://codeforces.com/contest/1501/problem/B
// Memory Limit: 256 MB
// Time Limit: 1000 ms
// 
// Powered by CP Editor (https://cpeditor.org)
 
#include <bits/stdc++.h>
#define w(t) int  t; cin>>t; while(t--)
using namespace std;
int32_t main() {
    
   // IOS;
   // seive();
   w(t){
   	    long long int n;
   	    cin>>n;
   	    long long int arr[n];
   	    for(int i=0;i<n;i++)
   	    cin>>arr[i];
   	    vector<long long int> vi;
   	    long long int i=n-1;
        long long flag = 0;
   	    while(i>=0)
   	    {
   	        if(arr[i]>flag)
               flag=arr[i];
             if(flag>0)
             {
                 arr[i]=1;
                 flag--;
             }
             else
             arr[i]=0;
             i--;
   	    }
   	   for(int i=0;i<n;i++)
          cout<<arr[i]<<" ";
   	    
   	    cout<<"\n";
}
}