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

#define ll long long

int main()
{
    ll t;  cin>>t;
    while(t--)
    {
        ll n; cin>>n;

        vector<ll>v(n);

        for( ll i=0;i<n;i++)
        {
            cin>>v[i];
        }
        ll cream =0;
        vector<ll>ans;

        for( ll i=n-1;i>=0;i--)
        {
            cream = max(cream,v[i]);

            if(cream) ans.push_back(1);
            else ans.push_back(0);

            cream--;
        }
        reverse(ans.begin(),ans.end());
        for(auto i: ans) cout<<i<<" ";

        cout<<endl;
    }

}