﻿#include <bits/stdc++.h>

using namespace std;

#define double long double
#define FI first
#define SE second
typedef long long ll;
const ll inf = 1e15;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    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 cur = v[n - 1];

        vector<ll> ans(n);
        for (ll i = n - 1; i >= 0; i--) {
            cur = max(cur, v[i]) - 1;

            if (cur < 0) {
                ans[i] = 0;
                continue;
            }

            ans[i] = 1;
        }

        for (ll i = 0; i < n; i++)
            cout << ans[i] << ' ';
        cout << "\n";
    }

    return 0;
}