#include<bits/stdc++.h>
using namespace std;
 
#define int long long
#define ld long double
#define pb push_back
#define rep(i,a,b)        for(int i=a;i<b;i++)
#define all(x)            (x).begin(),(x).end()
 
const int N=1e5+5;
 
 
 
 
 
 
void solve(){
    int n;
    cin>>n;
    int a[n];
    rep(i,0,n){
        cin>>a[i];
    }
    vector<int> ans(n,0);
  
    int i=n-1,temp=a[n-1];
    while(i>=0){
        temp=max(temp,a[i]);
        if(temp==0)
            i--;
        else{
           ans[i]=1;
           temp--;
           i--;
        }
    }
 
     rep(i,0,n)
     cout<<ans[i]<<" ";
     cout<<endl;
 
 
    
}
signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
#ifndef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif
 
#ifdef SIEVE
    sieve();
#endif
 
   int t=1;
   cin>>t;
 
while(t--)
    solve();
return 0;
 
}