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

const int N=2e5+5;
int t,n;
int a[N];
bool c[N];

int main()
{
    scanf("%d", &t);
    while (t--)
    {
        memset(c, 0, sizeof c);
        scanf("%d", &n);
        for (int i=0;i<n;i++)
            scanf("%d", &a[i]);

        int cnt=0;
        for (int i=n-1;i>=0;i--)
        {
            cnt=max(cnt, a[i]);
            c[i]=cnt-->0?1:0;
        }
        for (int i=0;i<n;i++)
            printf("%d%c", c[i], i==n-1?'\n':' ');

    }

    return 0;
}
