#include <bits/stdc++.h>
#define ll long long int
#define lnum vector<ll>
#define pii pair<ll,ll>
#define ld long double
#define out return 0
#define pb push_back
#define mp make_pair
#define exit exit(0)
#define pp pop_back
#define S second
#define F first
#define all(a) a.begin(),a.end()
const ll mrx=1e6+5,M=1e9+7,dm=1e3+5;
ll mx=-1e18,mn=1e18;
using namespace std;
ll t,n;
int main(){
	ios_base::sync_with_stdio(NULL);
	cin.tie(NULL), cout.tie(NULL);
	////////////////////////////////
	cin>>t;
	while(t--){
		cin>>n;
		ll a[n+1],b[n+1];
		for(int i=1;i<=n;i++){
			cin>>a[i];
			b[i]=0;
		}
		for(int i=1;i<=n;i++){
			if(a[i]>1){
				b[i]++;
				ll op=i-a[i]+1;
				if(op<1){
					op=1;
				}
				b[op]--;
			}
		}
		ll res=0;
		for(int i=1;i<=n;i++){
			res+=b[i];
			if(res==0){
				if(a[i]!=0){
					cout<<"1 ";
				}
				else{
					cout<<"0 ";
				}
			}
			else{
				cout<<"1 ";
			}
		}
		cout<<"\n";
	}













	out;
}
/*
      by Bekzhan Alakbayev.
*/
