// Empty :) 
 
#include<bits/stdc++.h>
using namespace std;
 
#define fast ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define ll long long
#define endl "\n"
#define fl(i,a,b) for(ll i=a;i<b;i++)
#define rfl(i,a,b) for(int i=a;i>b;i--)
#define cases() ll t;cin>>t; while(t--)
#define sz(x) ((int)(x).size())
#define all(v) v.begin(),v.end()
#define get(a,n) fl(i,0,n)  cin>>a[i];
#define pr(a,n,st) fl(i,st,n) cout<<a[i]<<" ";  cout<<endl;
#define prt(a,n,m) fl(i,0,n) fl(j,0,m) cout<<a[i][j]<<" \n"[j==m-1];
#define pb push_back
#define ff first
#define ss second
#define nl cout<<endl;
#define times clock_t timest = clock();
#define timee cerr << "[Executes in " << (double)(clock() - timest)/CLOCKS_PER_SEC << "s]" << endl;
typedef pair<ll,ll>pairs;
#define de(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cout << *it << " = " << a << endl;
    err(++it, args...);
}
 
const int MOD = 1e9+7, N = 2e5+5;
 
int main()
{
     fast;
     #ifndef ONLINE_JUDGE     
     freopen("inputf.in", "r", stdin);  freopen("outputf.in", "w", stdout);     
     #endif
     cases()
     {
          int n;    cin>>n;
          vector <int> a(n);  get(a,n);
          int val = 0, i=n-1; 
          while(i >=0 ){
               val = max(val, a[i]);
               if(val != 0){
                    a[i] = 1;
                    val--;
               }
               i--;
          }
          pr(a,n,0);
     }
} 