#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;

template<typename T> ostream& operator<<(ostream &os, const vector<T> &v) { os << '['; string sep = ""; for (const auto &x : v) os << sep << x, sep = ", "; return os << ']'; }
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; }
template<typename A> ostream& operator<<(ostream &os, const set<A> &s) { os << '{'; string sep = ""; for (const auto &x : s) os << sep << x, sep = ", "; return os << '}'; }
template<typename A, typename B> ostream& operator<<(ostream &os, const map<A, B> &m) { os << '{'; string sep = ""; for (const auto &x : m) os << sep << x.first << " -> " << x.second, sep = ", "; return os << '}'; }

#ifdef MY_DEBUG_FLAG
void debug() { cerr << endl; }
template<typename Ini, typename... Fim> void debug(Ini I, Fim... F) { cerr << I; if(sizeof...(F)) cerr << ", "; debug(F...);}
#define db(...) cerr << "DEBUG (" << #__VA_ARGS__ << ") == ", debug(__VA_ARGS__)
#else
#define db(...)
#endif

#define pb push_back
#define eb emplace_back
#define ff first
#define ss second
#define fast ios_base::sync_with_stdio(false), cout.tie(nullptr), cin.tie(nullptr)
#define sz(a) ((int)(a).size())
#define rep(i,a,b) for(int i=(a); i<(b); i++)
#define dec(i,n,a) for(int i=(n); i>=(a); i--)
#define clr(a,v) memset(a, v, sizeof(a))
#define all(a) (a).begin(),(a).end()

constexpr int inf = 0x3f3f3f3f;
constexpr int maxn = 1e5 + 10;
constexpr int mod = 1000000007;

int main() {
	int t; scanf("%d", &t);
	while(t--) {
		int n; scanf("%d", &n);
		vector<int> a(n+1);
		vector<int> pref(n+1, n), suf(n+1);
		for(int i = 1; i <= n; i++) {
			char c; scanf(" %c", &c);
			a[i] = c=='R';
		}
		for(int i = 1; i <= n; i++) {
			if(a[i] && i>=2) pref[i-2] = min(pref[i-2], i-1);
			else if(!a[i]) pref[i-1] = i-1;
		}
		for(int i = n; i >= 0; i--) {
			if(!a[i] && i <= n-1) suf[i+1] = max(suf[i+1], i);
			else if(a[i]) suf[i] = max(suf[i], i);
		}
		for(int i = n-2; i >= 0; i--)
			pref[i] = min(pref[i], pref[i+2]);
		for(int i = 2; i <= n; i++)
			suf[i] = max(suf[i], suf[i-2]);
		for(int i = 0; i <= n; i++)
			printf("%d ", pref[i] - suf[i] + 1);
		printf("\n");
	}
}
