#include <bits/stdc++.h>
using namespace std;

#define ll long long 

void solve(){
    int n;
    cin >> n;
    vector<int> v(n),v1(n,0);
    for(int i=0;i<n;i++){
        cin >> v[i];
    }
    for(int i=n-1;i>=0;){
        
        bool c = true;
        int j=i;
        
        while(v[i] > 0 && j >= 0){
            v1[j] = 1;
            v[i]--;
            j--;
            
            if(v[i] < v[j])
                v[i] = v[j];
            c = false;
        }
        if(!c)
            i = j;
        else
            i--;
            
    }
    
    for(int i=0;i<n;i++)
        cout << v1[i] << " ";
    cout << endl;
}

int main()
{
    int t = 1;
    cin >> t;
    while(t--)
        solve();
    
    return 0;
}
/*
1 1 0 1 1 1 
0 1 1 1 1 1 0 0 1 1 
0 0 0 
*/