#include <iostream> 
#include <string> 
#include <vector> 
#include <algorithm> 
#include <utility>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <map> 
#include <queue> 
#include <set> 
#include <stack>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cctype>
#include <iomanip>
#include <complex>
#include <math.h> 
#include <functional>
#include <cassert>
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
constexpr ll INF = 1e18;
constexpr ll LLMAX = 9223372036854775807;
constexpr int inf = 1e9;
constexpr ll mod = 1000000007;
// constexpr ll mod = 998244353;
// 右下左上
const int dx[8] = {1, 0, -1, 0,1,1,-1,-1};
const int dy[8] = {0, 1, 0, -1,1,-1,1,-1};
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
#define eol "\n"
// ---------------------------------------------------------------------------

ll gcd(ll a,ll b){
  if(b == 0) return a;
  return gcd(b,a%b);
}

void solve(){
  int N;
  cin >> N;
  string S;
  cin >> S;
  // 比に対してメモ化
  map<P,int> dp;
  int cnt_D=0,cnt_K=0;
  for(int i=0; i<N; i++){
    if(S[i] == 'D') cnt_D++;
    else cnt_K++;
    ll g = gcd(cnt_D,cnt_K);
    // 比は
    ll d = cnt_D/g;
    ll k = cnt_K/g;
    dp[P(d,k)]++;
    cout << dp[P(d,k)] << " ";
  }
  cout << endl;
  return;
}

int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int _;
  cin >> _;
  while(_--) solve();
  return 0;
}