func_code_string: #include<bits/stdc++.h>   // #include <ext/pb_ds/assoc_container.hpp>   // #include <ext/pb_ds/tree_policy.hpp>   // using namespace __gnu_pbds;   using namespace std;   // typedef tree<pair<int,int>, null_type, less<pair<int,int>>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;   #define ll long long    #define scn(n) scanf( %d ,&n)   #define lscn(n) scanf( %lld ,&n)   #define lpri(n) printf( %lld ,n)   #define pri(n) printf( %d ,n)   #define pln() printf(  n )   #define priln(n) printf( %d n ,n)   #define lpriln(n) printf( %lld n ,n)   #define rep(i,init,n) for(int i=init;i<n;i++)   #define pb push_back        #define mp make_pair   #define F first   #define S second   #define gcd __gcd   #define inf INT_MAX   #define ninf INT_MIN      #define inf INT_MAX   #define linf LLONG_MAX   #define lninf LLONG_MIN      const int mod = 1e9 + 7;   const int N = 2e5 + 4;      int solve()   {    int n; scn(n);       string s; cin >> s;       vector<int> pre(n + 1, 0), suf(n + 1, 0);       rep(i, 1, n + 1)    {     pre[i] = 1;        if(i - 2 >= 0 and s[i - 1] != s[i - 2])     pre[i] += pre[i - 1];    }       for(int i = n; i >= 1; i--)    {     suf[i] = 1;        if(i < n and s[i - 1] != s[i])     suf[i] += suf[i + 1];    }       rep(i, 0, n + 1)    {     if(i == 0)     {      if(s[i] ==  R )      printf( %d  , suf[i + 1] + 1);      else      printf( 1  );     }     else if(i == n)     {      if(s[i - 1] ==  L )      printf( %d  , pre[i] + 1);      else      printf( 1  );     }     else     {      int ans = 1;         if(s[i] ==  R )      ans += suf[i + 1];         if(s[i - 1] ==  L )      ans += pre[i];         printf( %d  , ans);     }    }       return 0;   }      int main()                     {    int t = 1; scn(t);       while(t--)    {     solve();    }          return 0;   }