func_code_string: #include<bits/stdc++.h>   using namespace std;   int main(){    ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);    int t;    cin >> t;    while(t--){     int n ; cin >> n;     vector<int> ans(n+1,1);     string str; cin >> str;     int cnt=0;     char now=str[0];     for(int i=0 ; i<n ; ++i){      if(str[i] != now) ++cnt , now = str[i];      else now = str[i] , cnt = 1;      if(now ==  L ) ans[i+1] += cnt;     }     now = str[n-1];     for(int i=n-1 ; i>=0 ; --i){      if(str[i] != now) ++cnt , now = str[i];      else now = str[i] , cnt = 1;      if(now ==  R ) ans[i] += cnt;     }     for(int i=0 ; i<=n ; ++i){      cout << ans[i];      if(i == n) cout <<   n ;      else cout <<    ;     }    }   }