#include<bits/stdc++.h>
#define ll long long
#define INF 0x7f7f7f7f //2139062143
#define llINF 9223372036854775807
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
const int maxn=2e5+7;
const double eps=1e-5;
const int mod=1e9+7;
int n, m;
int a[maxn];
int b[maxn];
int c[maxn];
void insert (int l, int r){
    b[l] ++;
    b[r + 1] --;
}
int main(){ 
    IOS;
    int t; cin >> t;
    while (t --){
        int n; cin >> n;
        for (int i = 1 ; i <= n ; i ++) {
            cin >> a[i];
            if (a[i]){
                if (a[i] == 1) insert (i, i);
                else insert (max(1, i - a[i] + 1),i);
            }
            //cout << max(1, i - a[i]) << ' ' << i << endl;
        }
        for (int i = 1 ; i <= n ; i ++){
            c[i] = c[i - 1] + b[i];
            if (c[i]) cout << 1 << ' ';
            else cout << 0 << ' ';
        }
        cout << endl;
        for (int i = 0 ; i <= n + 1 ; i ++){
            b[i] = 0;
            c[i] = 0;
            a[i] = 0;
        }
    }
    return 0;
}
