#include<bits/stdc++.h>
using namespace std;
#define ll long long  int 
#define pb push_back
#define mod 1000000007 
#define mod1 998244353
#define ld long double
#define  N  200005
/* __                     __                         
  |  \                     |  \                        
 _| ▓▓_   __    __  _______| ▓▓____   ______   ______  
|   ▓▓ \ |  \  |  \/       \ ▓▓    \ |      \ /      \ 
 \▓▓▓▓▓▓ | ▓▓  | ▓▓  ▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓\ \▓▓▓▓▓▓\  ▓▓▓▓▓▓\
  | ▓▓ __| ▓▓  | ▓▓\▓▓    \| ▓▓  | ▓▓/      ▓▓ ▓▓   \▓▓
  | ▓▓|  \ ▓▓__/ ▓▓_\▓▓▓▓▓▓\ ▓▓  | ▓▓  ▓▓▓▓▓▓▓ ▓▓      
   \▓▓  ▓▓\▓▓    ▓▓       ▓▓ ▓▓  | ▓▓\▓▓    ▓▓ ▓▓      
    \▓▓▓▓  \▓▓▓▓▓▓ \▓▓▓▓▓▓▓ \▓▓   \▓▓ \▓▓▓▓▓▓▓\▓▓      
                                                       
                                                       
   */
 
 

 
 // mid = lo + (hi-lo+1)/2   bin search;                                            bin search


/*ll pow(ll a,ll b)
{
   if(b==0)return 1;
   else
   {
      if(b%2==1)
      {
         return (a*pow((a*a)%mod,b/2)%mod);
      }
      else
      {
         return (pow((a*a)%mod,b/2));
      }
      
   }
   
}*/
/*void seive()
{
   bool ch[1000006];
  memset(ch,true,sizeof(ch));
  int n=1000005;

  for(int i=2;i*i<=n;i++)
  {
     if(ch[i])
     {
        for(int j=i*i;j<=n;j+=i)
        {
           ch[j]=false;
        }
     }
  }
  int z=0;

  for(int i=1;i<n;i++)
  {
     if(ch[i])z++;
     sum[i]=z;

  }




}*/


void dynamic()
{

int n;
cin>>n;
string s;
cin>>s;
int dp[n];
int pre[n];
pre[0]=1;
dp[n-1]=1;
for(int i=n-2;i>=0;i--)
{
   if(s[i]!=s[i+1])
   {
      dp[i]=dp[i+1]+1;

   }
   else
   {
      dp[i]=1;

   }
   
}
for(int i=1;i<n;i++)
{
   if(s[i]!=s[i-1])
   {
      pre[i]=pre[i-1]+1;
   }
   else
   {
      pre[i]=1;

   }
   
}
if(s[0]=='R')
{
   cout<<1+dp[0]<<" ";
}
else
{
   cout<<"1"<<" ";
}
for(int i=0;i<n;i++)
{
   int ans=1;
   if(s[i]=='L')
   {ans+=pre[i];
   }
   if(i+1<n&&s[i+1]=='R')ans+=dp[i+1];
   cout<<ans<<" ";
}

cout<<"\n";

}




int main()
{

ios_base::sync_with_stdio(false);cin.tie(NULL);
int t;
cin>>t;

//seive();

while(t--)
{ dynamic();
}

}