func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, l[1010], r[1010];   char a[1010];   int main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     cin >> n;     for (int i = 1; i < n; i++) cin >> a[i];     l[1] = 0;     for (int i = 1; i < n; i++) {       if (a[i] ==  R ) l[i + 1] = l[i] + 1;       if (a[i] ==  = ) l[i + 1] = l[i];       if (a[i] ==  L ) l[i + 1] = 0;     }     r[n] = 0;     for (int i = n - 1; i >= 1; i--) {       if (a[i] ==  L ) r[i] = r[i + 1] + 1;       if (a[i] ==  = ) r[i] = r[i + 1];       if (a[i] ==  R ) r[i] = 0;     }     for (int i = 1; i <= n; i++) cout << max(l[i], r[i]) + 1 <<    ;     return 0;   }   