#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ps(b) cout << (b ? "YES" : "NO") << '\n'
#define pc cout << "Case " << tc << ": "
#ifdef LOCAL
#include "def.h"
#else
#define ck(...)
#endif
const ll M = 1e9 + 7, N = 2e5 + 5;
ll n;
vector<ll> v(N);
ll cnt(ll in){
ll c = 0, i, j;
set<ll> st;
for (i = 0; i < n;++i){
if(st.find(i) != st.end())
continue;
c++;
if (i == in) continue;
for (j = i; j < n; j = j + v[j]){
if(st.find(j) != st.end())
break;
st.insert(j);
if(j==in) break;
}
}
return c;
}
void test(int tc) {
ll a = 0, b = 0, c = 0, d = 0, i = 0, j = 0, k = 0, m = 0, q = 0;
cin >> n;
for (i = 0; i < n; ++i) { cin >> v[i]; }
for (i = 0; i < n;++i) {
cout << cnt(i) << ' ';
}
cout << '\n';
}
signed main() {
cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit|cin.badbit);
int tc = 0, t = 1;
cin >> t;
while (tc < t) test(++tc);
return 0;
}