#include<bits/stdc++.h>
#define ll long long
#define int long long
#define sz(c) c.size()
#define fr first
#define sc second
#define pb push_back
#define sz(c) c.size()
#define ppb  pop_back
#define all(a)      (a).begin(),(a).end()
#define rep(i,a,n)   for( int i=a ; i<n ; i++)
#define U 1000000007
#define N 100005
#define ins insert
using namespace std;
signed main()
{
  ios_base::sync_with_stdio(false);
  int t;
  cin>>t;
  while(t--){
    int n;
    cin>>n;
    string s;
    cin>>s;
    int alr[n],all[n];
    rep(i,0,n) alr[i]=1,all[i]=1;
    for(int i=n-2;i>=0;i--){
      if(s[i]!=s[i+1]){
        alr[i]+=alr[i+1];
      }
    }
    for(int i=1;i<n;i++){
      if(s[i]!=s[i-1]) all[i]+=all[i-1];
    }
    int ans[n+1];
    rep(i,0,n+1) ans[i]=1;
    rep(i,0,n+1){
      if(i){
        if(s[i-1]=='L') ans[i]+=all[i-1];
      }
      if(i!=n){
        if(s[i]=='R') ans[i]+=alr[i];
      }
    }
    // rep(i,0,n) cout<<all[i]<<" ";
    // cout<<endl;
    // rep(i,0,n) cout<<alr[i]<<" ";
    // cout<<endl;
    rep(i,0,n+1) cout<<ans[i]<<" ";
    cout<<endl;
  }



}