import java.io.*; import java.util.*; import java.util.function.*; import java.util.stream.*; public class Main { static final int MOD = 998244353; public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); int n = sc.nextInt(); int k = sc.nextInt(); char[] input = sc.next().toCharArray(); int count = 0; int target = 0; char prev = 'N'; for (char c : input) { if (c == 'N') { count++; if (prev != 'C') { target++; } } prev = c; } long ans = 0; Combination comb = new Combination(target + 3); for (int i = 1; i <= count - k && i <= target; i++) { ans += comb.getComb(target, i); ans %= MOD; } System.out.println(ans); } } class Combination { static final int MOD = 998244353; long[] fac; long[] finv; long[] inv; public Combination (int size) { fac = new long [size]; finv = new long [size]; inv = new long [size]; fac[0] = 1; fac[1] = 1; finv[0] = 1; finv[1] = 1; inv[1] = 1; for (int i = 2; i < size; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } public long getComb(int n, int k) { if (n < k || n < 0 || k < 0) { return 0; } return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } } class Scanner { BufferedReader br; StringTokenizer st = new StringTokenizer(""); StringBuilder sb = new StringBuilder(); public Scanner() { try { br = new BufferedReader(new InputStreamReader(System.in)); } catch (Exception e) { } } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } public String next() { try { while (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } } catch (Exception e) { e.printStackTrace(); } finally { return st.nextToken(); } } }