#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int gcd(int a,int b)
{
	if(b==0)
	{
		return a;
	}

	return gcd(b,a%b);
}
void solve()
{
	int n;
	string s;
	cin>>n>>s;
	map<pair<int,int>,int>mp;
	int d=0,k=0;
    for(int i=0;i<n;i++)
    {
    	if(s[i]=='D'){d++;}
    	if(s[i]=='K'){k++;}
    	int a=d,b=k;
    	int gc=gcd(a,b);
    	a=a/gc;b=b/gc;
    	mp[make_pair(a,b)]++;
    	cout<<mp[make_pair(a,b)]<<" ";
    }
    cout<<endl;
}
int main()
{
	int t;
	cin>>t;
	while(t>0)
	{
		solve();
		t--;
	}
	return 0;
}