F. Paint It Black
time limit per test
2 seconds
memory limit per test
512 megabytes
input
standard input
output
standard output

You have a strip with $$$n$$$ cells, numbered $$$1, 2, \ldots n$$$, each colored either black or white. You have a paint brush of length $$$k$$$, and a cost array $$$c_1, c_2, \ldots c_{n-k+1}$$$. You repeat the following step until all cells are black:

  • Choose a random index $$$i$$$ from $$$\{1, 2, \ldots n - k + 1\}$$$, and use the brush to paint all the cells $$$i, i + 1, \ldots i + k - 1 $$$ black. Add $$$c_i$$$ to the cost.

What is the total expected cost?

Input

The first line contains two integers $$$n (1 \leq n \leq 4000)$$$ and $$$k(1 \leq k \leq n$$$).

The second line contains a string of length $$$n$$$ consisting of W and B, describing the initial colors of the cells $$$1, 2, \ldots n$$$.

The third line contains $$$n - k + 1$$$ space separated integers $$$c_1, c_2, \ldots c_{n-k+1}$$$.

Output

Print a single line, containing the expected cost modulo $$$998244353$$$. It can be proved that the expected cost is rational, and can be written in the form $$$\frac{P}{Q}$$$, where $$$Q \neq 0 \pmod {998244353}$$$

Example
Input
4 2
WBWW
3 1 1
Output
499122184
Note

The expected value of the cost is $$$15/2$$$