/*************Bismillah-ir-Rahman-ir-Rahim**************/
/**
    -> NEVER LOSE HOPE IN THE MERCY OF ALLAH...
    -> ALLAH KNOWS WHAT IS THE BEST FOR YOU AND WHEN IT'S BEST FOR YOU TO HAVE IT...
**/
#include<bits/stdc++.h>
using namespace std;
#define IO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
//#define int long long
typedef double dd;
typedef vector<int> vi;
typedef vector<char> vc;
typedef list<int> li;
typedef set<int> si;
typedef map<int,int> mp;
typedef pair<int,int> pr;
#define pb push_back
#define pf push_front
#define mk make_pair
#define F first
#define S second
#define pi acos(-1.0)
#define endl '\n'

void solve()
{
    int n; cin >> n;
    string s; cin >> s;
    int r = 0;  int l = 0;
    while(r < n-1 && !(s[r] == s[r+1])) {
        r++;
        // if(r == n-2) {
        //     if(s[r] != s[r+1]) r++;
        //     break;
        // }
    }

    if(s[0] == 'R') cout << r+2 << ' ';
    else cout << "1" << ' ';

    for (int i = 1; i < n; i++) {
        
        int ll = 1;
        if(s[i-1] == 'L') ll = i - l + 1;
        
        if(s[i-1] == s[i]) l = i;
        int rr = 1;
        
        if(r < i) {
            r = i;
            while(r < n-1 && !(s[r] == s[r+1])) {
                r++;
                // if(r == n-2) {
                //     if(s[r] != s[r+1]) r++;
                //     break;
                // }
            }
        }
        
        if(s[i] == 'R') {
            rr = r - i + 2;
            // cout << ' ' << i << endl;
        }
        if(s[i-1] == 'L' && s[i] == 'R') {
            cout << ll+rr-1 << ' ';
        } else {
            cout << max(rr, ll) << ' ';
        } 
    }
    if(s[n-1] == 'L') cout << n-l+1 << ' ';
    else cout << "1" << ' ';
    cout << endl;

}
int32_t main()
{
    IO;
    int TestCase; 
    // TestCase = 1;
    cin >> TestCase;
    while(TestCase--)
        solve();
    return 0;
}
