#include <map>
#include <iomanip>
#include <set>
#include <unordered_set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <unordered_map>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef set<ll>::iterator si;
typedef set<ll>::reverse_iterator rsi;
typedef unordered_set<ll>::iterator usi;
typedef map<ll,ll>::iterator mi;
typedef map<ll,ll>::reverse_iterator rmi;
typedef unordered_map<ll,ll>::iterator umi;
typedef pair<ll,ll> pll;
typedef map<ll,ll> mll;
typedef vector<ll> vll;
typedef vector<pll> vpll;
typedef vector<vll> vvll;
typedef vector<bool> vb;
#define M1 1000000007
#define M2 998244353
#define INF (1e9+7)
#define fast_io ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define vinput(x,n) for(ll ix=0;ix<n;ix++) cin>>x[ix];
#define vprint(x,a,n) for(ll ix=a;ix<a+n;ix++) cout<<x[ix]<<' ';cout<<'\n';
#define mprint(x,r,c) for(ll ix=0;ix<r;ix++){for(ll jdx=0;jdx<c;jdx++)cout<<x[ix][jdx]<<' ';cout<<'\n';}
#define print(x) cout<<x<<'\n'
#define printc(ix,x) cout<<"Case #"<<ix<<": "<<x<<endl
#define yes print("YES")
#define no print("NO")
#define all(x) x.begin(),x.end()
#define FOR(i,st,n) for(ll i = st; i < n; i++)
#define FORR(i,n,en) for(ll i = n-1; i >= en; i--)
#define F first
#define S second
#define mp make_pair

ll min(ll &x, ll &y) { return (x<y)?x:y; }
ll max(ll &x, ll &y) { return (x>y)?x:y; }

ll add(const ll &x, const ll &y, const ll &m) { return ((x%m + y%m)%m + m)%m; }
ll sub(const ll &x, const ll &y, const ll &m) { return ((x%m - y%m)%m + m)%m; }
ll mul(const ll &x, const ll &y, const ll &m) { return ((x%m * y%m)%m + m)%m; }

ll gcdExtended(ll a, ll b, ll *x, ll *y) 
{
    if (a == 0) 
    { 
        *x = 0, *y = 1; 
        return b; 
    } 
  
    ll x1, y1;
    ll gcd = gcdExtended(b%a, a, &x1, &y1); 
    *x = y1 - (b/a) * x1; 
    *y = x1; 
  
    return gcd; 
}
ll modInverse(ll b, ll m) 
{ 
    ll x, y;
    ll g = gcdExtended(b, m, &x, &y); 
    if (g != 1) 
        return -1;
    return (x%m + m) % m; 
}
ll modDivide(ll a, ll b, ll m) 
{ 
    a = a % m; 
    ll inv = modInverse(b, m);
    return (inv * a) % m; 
}
bool isPrime(ll x)
{
    for(ll i = 2; i <= sqrt(x); i++)
    {
        if(x%i == 0) return false;
    }
    return true;
}
bool sortbysec(const pair<ll,ll> &a, const pair<ll,ll> &b)
{ 
    return (a.second < b.second); 
} 
int sign(ll x)
{
    if(x < 0) return -1;
    else if(x > 0) return 1;
    else return 0;
}
vll prefix(const vll &a)
{
    ll n = a.size();
    vll res(n,0);
    res[0] = a[0];
    for(ll i = 1; i < n; i++) res[i] = res[i-1] + a[i];
    return res;
}

int main()
{
	fast_io;
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    ll t = 1;
    cin >> t;
    ll cs = 0;
    while(t--)
    {
        cs++;
        ll n;
        cin >> n;
        string s;
        cin >> s;
        vll a, b;
        vll cnt(n+1,1);
        a.push_back(0);
        FOR(i,1,n) {
            if(s[i] == s[i-1]) {
                b.push_back(i-1);
                a.push_back(i);
            }
        }
        b.push_back(n-1);
        FOR(i,0,n+1) {
            if(i) {
                if(s[i-1] == 'L') {
                    ll idx = upper_bound(all(a),i-1)-a.begin()-1;
                    cnt[i] += i-1-a[idx]+1;
                }
            }
            if(i < n) {
                if(s[i] == 'R') {
                    ll idx = upper_bound(all(a),i)-a.begin()-1;
                    cnt[i] += b[idx]-i+1;
                }
            }
        }
        vprint(cnt,0,n+1);
    }
    return 0;
}