Problem: The only difference between the two versions of the problem is that there are no updates in the easy version.

There are n spools of thread placed on the rim of a circular table. The spools come in two types of thread: the first thread is black and the second thread is white.

For any two spools of the same color, you can attach them with a thread of that color in a straight line segment. Define a matching as a way to attach spools together so that each spool is attached to exactly one other spool.

Coloring is an assignment of colors (white and black) to the spools. A coloring is called valid if it has at least one matching. That is if the number of black spools and the number of white spools are both even.

Given a matching, we can find the number of times some white thread intersects some black thread. We compute the number of pairs of differently colored threads that intersect instead of the number of intersection points, so one intersection point may be counted multiple times if different pairs of threads intersect at the same point. If c is a valid coloring, let f(c) denote the minimum number of such intersections out of all possible matchings.

<image> The circle above is described by the coloring bwbbbwww. After matching the spools as shown, there is one intersection between differently colored threads. It can be proven that it is the minimum possible, so f(bwbbbwww) = 1. 

You are given a string s representing an unfinished coloring, with black, white, and uncolored spools. A coloring c is called s-reachable if you can achieve it by assigning colors to the uncolored spools of s without changing the others.

A coloring c is chosen uniformly at random among all valid, s-reachable colorings. Compute the [expected value](https://en.wikipedia.org/wiki/Expected_value) of f(c). You should find it by modulo 998244353.

There will be m updates to change one character of s. After each update, you should again compute the expected value of f(c).

We can show that each answer can be written in the form p/q where p and q are relatively prime integers and qnot≡ 0\pmod{998244353}. The answer by modulo 998244353 is equal to (p⋅ q^{-1}) modulo 998244353.

Input

The first line contains two integers n, m (2≤ n≤ 2⋅ 10^5, n is even, 0≤ m≤ 2⋅ 10^5) — the number of spools and the number of updates, respectively.

The second line contains a string s of length n — the unfinished coloring of the spools. The i-th character will be 'w', 'b', or '?', describing if the i-th spool is white, black, or uncolored, respectively.

Each of the next m lines contains an integer i (1 ≤ i ≤ n) — the position of the character in s to be updated, and a character c (c ∈ \{w, b, ?\}) — the new color of the spool i after the update.

It is guaranteed there exists at least one uncolored spool initially and after each update.

Output

Print m+1 lines: the expected value of f(c) initially and after each update. All values should be found by modulo 998244353.

Examples

Input


8 0
bwbb?www


Output


1


Input


10 3
???ww?wb??
4 ?
5 ?
2 w


Output


436731905
218365953
374341633
530317313


Input


4 3
bw?b
1 w
2 b
1 w


Output


0
0
1
1

Note

The first test corresponds closely to the image. Coloring '?' as 'w' does not create a valid coloring because the number of black spools is odd. Then the only reachable valid coloring is 'bwbbbwww' and f(bwbbbwww) = 1, so the expected value is 1.

In the second test, the string after each update is:

  1. ????w?wb??
  2. ??????wb??
  3. ?w????wb??



In the third test, the string after each update is:

  1. ww?b
  2. wb?b
  3. wb?b

Solution (in CPP):

Solution:
#include <cstdio>
#include <cassert>

using ll = long long;

const int MOD = 998244353;

struct mint
{
	public:
		int v;
		mint(int _v=0): v(_v)
		{
			if(v<-MOD || MOD <= v) v%=MOD;
			if(v<0) v+=MOD;
		}

		mint& operator += (const mint& o) {if((v+=o.v)>=MOD) v-=MOD; return *this;}
		mint& operator -= (const mint& o) {if((v-=o.v)<0) v+=MOD; return *this;}
		mint& operator *= (const mint& o) {v=(ll)v*o.v%MOD; return *this;}

		friend mint operator + (mint a, const mint& b) {return a+=b;}
		friend mint operator - (mint a, const mint& b) {return a-=b;}
		friend mint operator * (mint a, const mint& b) {return a*=b;}
};

const int MN = 2e5+10;
const int MM = 2e5+10;

mint inv[MN], F[2][MN], _p2[MN*2], *p2=_p2+MN;

void pcp()
{
	inv[1]=mint(1);
	for(int i=2;i<MN;++i)
		inv[i]=mint(MOD-MOD/i)*inv[MOD%i];
	F[0][0]=F[1][0]=mint(1);
	for(int i=1;i<MN;++i)
		F[0][i]=F[0][i-1]*mint(i), F[1][i]=F[1][i-1]*inv[i];
	p2[0]=mint(1);
	for(int i=1;i<MN;++i)
		p2[i]=p2[i-1]*mint(2), p2[-i]=p2[-i+1]*inv[2];
}

mint choose(int n, int k) {assert(0 <= k && k <= n); return F[0][n]*F[1][k]*F[1][n-k];}

struct chpfx
{
	public: 
		int n, k;
		mint val; // n choose i, i<=k
		chpfx(): n(0), k(0), val(1) {}

		void inc_nk()
		{
			val = val*mint(2)+choose(n+1, k+1)-choose(n, k); // or ch(n,k+1), allowing k>n
			++n, ++k;
		}
		void dec_nk()
		{
			assert(n>0 && k>0);
			val = (val-choose(n, k)+choose(n-1, k-1))*inv[2];
			--n, --k;
		}
		void inc_k()
		{
			assert(k<n);
			val += choose(n, k+1);
			++k;
		}
		void dec_k()
		{
			assert(k>0);
			val -= choose(n, k);
			--k;
		}
		void setk(int _k)
		{
			for(;k<_k;) inc_k();
			for(;k>_k;) dec_k();
		}
		void go(int _n, int _k)
		{
			if(_n<n)
			{
				setk(_k+n-_n);
				for(;n>_n;)
					dec_nk();
			}
			else
			{
				for(;n<_n;)
					inc_nk();
				setk(_k);
			}
		}
} cur_val;

int N, M, shift, qm;
char s[MN];

mint eval(int n, int k) // return [sum(choose(n, i))] for i = k, k-2, k-4, ..., (1 or 0)
{
	assert(0 <= k && k <= n);
	if(n==0) return mint(1); // special qm==1 case
	if(k==n) --k; //?

	cur_val.go(n-1, k);
	return cur_val.val;
}

mint answer() // by symmetry, we *can* just make shift positive, but I want it to work with negatives too
{
	//printf("%d %d\n", shift, qm);
	// sum over abs(i*2+shift-qm) * choose(qm, i) over all even i if shift-qm == 0 mod 4, otherwise over all odd i
	
	//signed: sum(i*2+shift-qm)*choose(qm, i) 
	//= 2*sum(i * choose(qm, i)) + (shift-qm) * sum(choose(qm, i))
	//= 2*qm*sum(choose(qm-1, i-1)) + ^^
	//= 2*qm*2^(qm-2) + (shift-qm)*2^(qm-1) [extra factor of 1/2 because choosing every other i coincidentally means dividing by 2]
	//= shift*2^(qm-1)
	mint ans=mint(shift)*p2[qm-1];
	if(qm==1)
		ans=(shift-qm)%4 == 0 ? mint(shift-1) : mint(shift+1); // edge case, because (0 choose even) = 1; doesnt satisfy the 1/2 factor rule

	//add back 2*negative
	//(i*2+shift-qm<0): i*2<qm-shift
	int i=(qm-shift)/2; // "i" will always be located at 0, so good
	if(i<=1) return ans; // 1 case: i==1 yields 0, i==0 would not be 2 mod 4

	if(i>qm) i -= i-qm+1>>1<<1;
	mint cnt = eval(qm, i);
	mint tot = i>0?mint(qm)*eval(qm-1, i-1):mint(0);

	//add 2*sum((qm-shift-2*i) * choose(qm, i))
	// = 2*(qm-shift)*sum(choose(qm, i)) - 4*(sum(i*choose(qm, i)))
	// = ...                             - 4*qm*sum(choose(qm-1, i-1))
	return ans + (mint(2*(qm-shift))*cnt - mint(4)*tot);
}

int main()
{
	pcp();
	scanf("%d%d %s", &N, &M, s);

	for(int i=0;i<N;++i)
		if(s[i]=='?')
			++qm;
		else
			shift += (s[i]=='b' ^ i&1)*2-1;

	printf("%d\n", answer()*p2[-1-qm]); // divide by 4 (len/4 = # crossings), divide by 2^(qm-1) (# of ok ways)
	for(int i=0;i<M;++i)
	{
		int x; scanf("%d", &x), --x;

		if(s[x]=='?') --qm;
		else shift -= (s[x]=='b' ^ x&1)*2-1;

		scanf(" %c", s+x);

		if(s[x]=='?') ++qm;
		else shift += (s[x]=='b' ^ x&1)*2-1;

		printf("%d\n", answer()*p2[-1-qm]);
	}

	return 0;
}