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

#define ll long long 
#define pb push_back

void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif

int main() {

	int t; cin >> t;
	while (t--) {
		int n; cin >> n;
		vector<int> a(n);
		for (int i = 0; i < n; ++i) {
			cin >> a[i];
		}

		vector<int> cake(n + 1, 0);
		for (int i = 1; i <= n; ++i) {
			// First, i-th layer is placed. So, we have [1, ..., i] 
			// [i, max(0, i - a[i] + 1)] will get drenched.
			if (a[i - 1] == 0) continue;

			int idx = max(1, i - a[i - 1] + 1);
			// debug(i, idx);
			cake[idx]++;
			if (i + 1 <= n) cake[i + 1]--;
		}

		for (int i = 1; i <= n; ++i) {
			cake[i] += cake[i - 1];
		}

		for (int i = 1; i <= n; ++i)  
			cout << (cake[i] > 0 ? 1: 0) << " ";
		cout << "\n";
	}
}