#include using namespace std; int main() { int N, K; string S; cin >> N >> K >> S; constexpr int mod = 998244353; int fact[300001], inv[300001], inv_fact[300001]; fact[0] = inv_fact[0] = 1; fact[1] = inv_fact[1] = inv[1] = 1; for (int i = 2; i <= 300000; ++i) { fact[i] = (long long)i * fact[i-1] % mod; inv[i] = (long long)(mod - inv[mod % i]) * (mod / i) % mod; inv_fact[i] = (long long)inv[i] * inv_fact[i-1] % mod; } int cnt{}; for (int i = 0; i < N; ++i) if (S[i] == 'N') { if (i == 0) ++cnt; else if (S[i-1] == 'C') --K; else ++cnt; } int ans{}; for (int k = 1; k <= cnt - max(K, 0); ++k) { ans += (long long)fact[cnt] * inv_fact[cnt-k] % mod * inv_fact[k] % mod; ans %= mod; } cout << ans << endl; }