#include<bits/stdc++.h>
#define int long long
#define print1(a) for(auto x:a)cout << x<<" ";cout <<endl;
#define fastio ios_base::sync_with_stdio(false);cin.tie(0);
#define print2(a,r,c) for(int i=0;i<r;i++){for(int j=0;j<c;j++)cout<<a[i][j]<<" ";cout << endl;}
using namespace std;
int dx[]={0,0,1,-1},dy[]={1,-1,0,0};
void solve()
{
	int n;
	cin >> n;
	string str;
	cin >> str;
	int ans[n+1];
	for(int i=0;i<2;i++)
	{
		int left=i,right=i,total=0;
		if(left>0)
		{
			int count=0;
			for(int j=left-1;j>=0;j--)
			{
				if(count&1)
				{
					if(str[j]=='R')
					count++;
					else
					break;
				}
				else if(count%2==0)
				{
					if(str[j]=='L')
					count++;
					else
					break;
				}
			}
			total+=count;
		}
		if(right<n)
		{
			int count=0;
			for(int j=right;j<n;j++)
			{
				if(count&1)
				{
					if(str[j]=='L')
					count++;
					else
					break;
				}
				else if(count%2==0)
				{
					if(str[j]=='R')
					count++;
					else
					break;
				}
				
			}
			total+=count;
		}
		ans[i]=total+1;
	}
	for(int i=2;i<=n;i++)
	{
		int right=i,total=0;
		if(str[i-1]=='L' && str[i-2]=='R')
		{
			ans[i]=ans[i-2];
			continue;
		}
		else 
		if(str[i-1]=='L')total++;
		
		if(right<n)
		{
			int count=0;
			for(int j=right;j<n;j++)
			{
				if(count&1)
				{
					if(str[j]=='L')
					count++;
					else
					break;
				}
				else if(count%2==0)
				{
					if(str[j]=='R')
					count++;
					else
					break;
				}
				
			}
			total+=count;
		}
		ans[i]=total+1;
	}
	for(int x:ans)cout << x <<" ";
	cout << endl;
}
int32_t main()
{
	int t;
	cin >> t;
	while(t--)
	{
		solve();
	}
}  