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 <bits/stdc++.h>
#pragma GCC optimize ("O2,unroll-loops")
//#pragma GCC optimize("no-stack-protector,fast-math")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<pii, int> piii;
typedef pair<ll, ll> pll;
#define debug(x) cerr<<#x<<'='<<(x)<<endl;
#define debugp(x) cerr<<#x<<"= {"<<(x.first)<<", "<<(x.second)<<"}"<<endl;
#define debug2(x, y) cerr<<"{"<<#x<<", "<<#y<<"} = {"<<(x)<<", "<<(y)<<"}"<<endl;
#define debugv(v) {cerr<<#v<<" : ";for (auto x:v) cerr<<x<<' ';cerr<<endl;}
#define all(x) x.begin(), x.end()
#define pb push_back
#define kill(x) return cout<<x<<'\n', 0;

const int inf=1000000010;
const ll INF=10000000000000010LL;
const int mod=998244353, inv2=(mod+1)/2;
const int MAXN=400010, LOG=20;

ll n, m, k, u, v, x, y, t, X, Y, ans;
char A[MAXN];
ll F[MAXN], I[MAXN], tav[MAXN];

ll powmod(ll a, ll b){
	ll res=1;
	for (; b; b>>=1, a=a*a%mod) if (b&1) res=res*a%mod;
	return res;
}
ll nCr(ll n, ll r){
	if (r<0 || r>n) return 0;
	return F[n]*I[r]%mod*I[n-r]%mod;
}

struct Solver{
	ll n, r, ans;
	Solver(){
		n=r=0;
		ans=1;
	}
	void SetN(int N){
		// N>=0
		if (r<0){
			n=N;
			return ;
		}
		if (N==0){
			n=N;
			ans=(r>=0);
			return ;
		}
		while (n<N){
			ans=(2*ans - nCr(n, r))%mod;
			n++;
		}
		while (N<n){
			n--;
			ans=(ans + nCr(n, r))*inv2%mod;
		}
	}
	void SetR(int R){
		if (R<0){
			ans=0;
			r=-1;
			return ;
		}
		if (r==-1){
			r=0;
			ans=1;
		}
		while (r<R){
			r++;
			ans=(ans + nCr(n, r))%mod;
		}
		while (R<r){
			ans=(ans - nCr(n, r))%mod;
			r--;
		}
	}
	ll get(int p){
		p&=1;
		if (r<0) return 0;
		if (!n) return (p==0);
		ll res=(ans + nCr(n-1, r))*inv2%mod;
		if ((r&1)^p) res=(res-nCr(n-1, r))%mod;
//		cerr<<"get "<<n<<" "<<r<<"  "<<p<<": "<<res<<"\n";
//		debug(ans)
		return res;
	}
} S1, S2;

void Solve(){
	ans=0;
	if (!X){
		if ((n-Y)%2==0) ans=abs(n-Y);
		return ;
	}
	
	S1.SetN(X);
	S1.SetR(n-Y);
	ans=(n-Y)*S1.get(n-Y)%mod;
	
	S1.SetN(X-1);
	S1.SetR(n-Y-1);
	ans=(ans - X*S1.get(n-Y+1))%mod;
	
	S2.SetN(X);
	S2.SetR(n-Y);
	ans=(ans + (Y-n)*(tav[X-1]-S2.get(n-Y-2)))%mod;
	
	
	if (X>1){
		int p=n-Y+1;
		S2.SetN(X-1);
		S2.SetR(p-1);
		ans=(ans + X*(tav[X-2]-S2.get(p)))%mod;
	}
	else{
		if (n-Y+1<=0 && (n-Y+1)%2==0) ans=(ans + X)%mod;
	}
	
}

void print(){
	if (ans<0) ans+=mod;
	cout<<ans*powmod(2, mod-1-X)%mod<<"\n";
//	debug(ans)
//	cerr<<"\n";
}

int main(){
	ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	F[0]=tav[0]=1;
	for (int i=1; i<MAXN; i++) F[i]=F[i-1]*i%mod, tav[i]=tav[i-1]*2%mod;
	I[MAXN-1]=powmod(F[MAXN-1], mod-2);
	for (int i=MAXN-1; i; i--) I[i-1]=I[i]*i%mod;
	cin>>n>>m;
	for (int i=1; i<=n; i++){
		cin>>A[i];
		if (A[i]=='?') X++;
		else{
			if (i&1) A[i]='w'+'b'-A[i];
			Y+=(A[i]=='w');
		}
	}
	n>>=1;
	
	Solve();
	print();
	while (m--){
		cin>>x;
		if (A[x]=='?') X--;
		else Y-=(A[x]=='w');
		cin>>A[x];
		if (A[x]!='?' && (x&1)) A[x]='b'+'w'-A[x];
		if (A[x]=='?') X++;
		else Y+=(A[x]=='w');
		Solve();
		print();	
	}
	
	return 0;
}
/*
8 0
?bw?b???

4 4
bb?b
1 w
2 ?
2 w
2 ?

4 2
bb?b
1 w
2 ?


4 0
bb?b

4 0
w??b


*/