// 愚直 #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include #define N_MAX 100000 #define u32 unsigned int #define MOD 998244353 int main(){ int n; scanf("%d", &n); char s[N_MAX]; scanf("%s", s); int a[N_MAX] = { 0 }; for(int i = 0; i < N_MAX; ++i){ a[i] = (s[i] == 'R'); } u32 dp[N_MAX + 1][2] = { 0 }; u32 ndp[N_MAX + 1][2] = { 0 }; dp[0][0] = dp[0][1] = 1; dp[1][a[0]] = 1; for(int i = 1; i < n; ++i){ // printf("%d\n", i); ndp[0][0] = dp[0][0]; ndp[0][1] = dp[0][1]; for(int j = 1; j < n + 1; ++j){ ndp[j][0] = dp[j][0]; ndp[j][1] = dp[j][1]; ndp[j][a[i]] += dp[j - 1][a[i] ^ 1]; ndp[j][a[i]] -= (ndp[j][a[i]] >= MOD) * MOD; } for(int j = 0; j < n + 1; ++j){ dp[j][0] = ndp[j][0]; dp[j][1] = ndp[j][1]; } } for(int j = 1; j < n + 1; ++j){ u32 ans = dp[j][0] + dp[j][1]; ans -= (ans >= MOD) * MOD; printf("%u\n", ans); } return 0; }