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 <algorithm>  
#include <iostream>  
#include <sstream>  
#include <string>  
#include <vector>  
#include <queue>  
#include <set>  
#include <map>  
#include <cstdio>  
#include <cstdlib>  
#include <cctype>  
#include <cmath>  
#include <cstring>
#include <list>  
#include <cassert>
#include <climits>
#include <bitset>
#include <chrono>
#include <random>
using namespace std;

#define PB push_back  
#define MP make_pair  
#define SZ(v) ((int)(v).size())  
#define FOR(i,a,b) for(int i=(a);i<(b);++i)  
#define REP(i,n) FOR(i,0,n)  
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)  
#define REPE(i,n) FORE(i,0,n)  
#define FORSZ(i,a,v) FOR(i,a,SZ(v))  
#define REPSZ(i,v) REP(i,SZ(v))  
std::mt19937 rnd((int)std::chrono::steady_clock::now().time_since_epoch().count());
typedef long long ll;
ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); }

const int MAXN = 200000;
const int MAXQ = 200000;
const int MOD = 998244353;
const int INV2 = (MOD + 1) / 2;
void inc(int& a, int b) { if ((a += b) >= MOD) a -= MOD; }
void dec(int &a, int b) { inc(a, MOD - b); }

int n, nq;
string s;
int qidx[MAXQ]; char qc[MAXQ]; int qans[MAXQ];

int inv[MAXN + 1];
int fac[MAXN + 1];
int ifac[MAXN + 1];
int ip2[MAXN + 1];

int choose(int n, int k) { if (k<0 || k>n) return 0; return (ll)fac[n] * ifac[k] % MOD*ifac[n - k] % MOD; }

struct CombSum {
	int n, klo, khi;
	int sum; // sum(k=klo..khi,choose(n,k))

	CombSum() { n = 0, klo = 0, khi = 0, sum = 1; }

	// if klo<=khi sum(k=klo..khi,choose(n+1,k))=sum(k=klo..khi,choose(n,k-1)+choose(n,k))=2*sum+choose(n,klo-1)-choose(n,khi)
	int upd(int nn, int nklo, int nkhi) {
		while (n < nn) {
			if (klo <= khi) sum = ((ll)2 * sum + choose(n, klo - 1) + MOD - choose(n, khi)) % MOD;
			++n;
		}
		while (n > nn) {
			if (klo <= khi) sum = ((ll)sum + MOD - choose(n - 1, klo - 1) + choose(n - 1, khi))*INV2%MOD;
			--n;
		}
		while (klo > nklo) {
			--klo;
			if (klo <= khi) inc(sum, choose(n, klo));
		}
		while (klo < nklo) {
			if (klo <= khi) dec(sum, choose(n, klo));
			++klo;
		}
		while (khi > nkhi) {
			if (klo <= khi) dec(sum, choose(n, khi));
			--khi;
		}
		while (khi < nkhi) {
			++khi;
			if (klo <= khi) inc(sum, choose(n, khi));
		}
		return sum;
	}
};

CombSum asum, bsum, csum, dsum;

int calc(int evenq, int oddq, int evenw, int oddw) {
	assert(evenq + oddq >= 1);
	int half = n / 2;
	int num = 0;
	// bal = even white - odd white
	int lo = evenw - oddq - oddw; if (lo % 2 != 0) ++lo;
	int hi = evenq + evenw - oddw; if (hi % 2 != 0) --hi;
	// i=offset+bal
	int offset = oddq - evenw + oddw;

	if (evenq + oddq == 1) {
		for (int i = offset + lo; i <= offset + hi; i += 2) {
			num = (num + (ll)abs(i - offset)*choose(evenq + oddq, i)) % MOD;
		}
	} else {
		int amlt = evenq + oddq, an = evenq + oddq - 2, alo = offset + max(2, lo) - 2, ahi = offset + hi - 1; if ((alo & 1) == (ahi & 1)) --ahi; alo = max(alo, 0);
		int bmlt = MOD - offset, bn = evenq + oddq - 1, blo = offset + max(2, lo) - 1, bhi = offset + hi; if ((blo & 1) == (bhi & 1)) --bhi; blo = max(blo, 0);
		int cmlt = MOD - evenq - oddq, cn = evenq + oddq - 2, clo = offset + lo - 2, chi = offset + min(-2, hi) - 1; if ((clo & 1) == (chi & 1)) ++clo; clo = max(clo, 0);
		int dmlt = MOD + offset, dn = evenq + oddq - 1, dlo = offset + lo - 1, dhi = offset + min(-2, hi); if ((dlo & 1) == (dhi & 1)) ++dlo; dlo = max(dlo, 0);

		num = (num + (ll)amlt*asum.upd(an, alo, ahi)) % MOD;
		num = (num + (ll)bmlt*bsum.upd(bn, blo, bhi)) % MOD;
		num = (num + (ll)cmlt*csum.upd(cn, clo, chi)) % MOD;
		num = (num + (ll)dmlt*dsum.upd(dn, dlo, dhi)) % MOD;
		//FORE(i, alo, ahi) num = (num + (ll)amlt*choose(an, i)) % MOD;
		//FORE(i, blo, bhi) num = (num + (ll)bmlt*choose(bn, i)) % MOD;
		//FORE(i, clo, chi) num = (num + (ll)cmlt*choose(cn, i)) % MOD;
		//FORE(i, dlo, dhi) num = (num + (ll)dmlt*choose(dn, i)) % MOD;

		// i*choose(x,i) = i * fac[x]*ifac[i]*ifac[x-i] = x * fac[x-1]*ifac[i-1]*ifac[x-i] = x * choose(x-1,i-1) when i>=1 and x>=1, but also fine for i=0
		// choose(x,i) = choose(x-1,i-1)+choose(x-1,i) when i>=1 and i<=x-1, but also fine for all x>=1
		//for (int i = offset + max(2, lo); i <= offset + hi; i += 2) {
			//num = (num + (ll)(evenq + oddq)*choose(evenq + oddq - 2, i - 2)) % MOD;
			//num = (num + (ll)(evenq + oddq)*choose(evenq + oddq - 2, i - 1)) % MOD;
			//num = (num + (ll)(MOD - offset)*choose(evenq + oddq - 1, i - 1)) % MOD;
			//num = (num + (ll)(MOD - offset)*choose(evenq + oddq - 1, i)) % MOD;
		//}
		//for (int i = offset + min(-2, hi); i >= offset + lo; i -= 2) {
			//num = (num + (ll)(MOD - evenq - oddq)*choose(evenq + oddq - 2, i - 2)) % MOD;
			//num = (num + (ll)(MOD - evenq - oddq)*choose(evenq + oddq - 2, i - 1)) % MOD;
			//num = (num + (ll)(MOD + offset)*choose(evenq + oddq - 1, i - 1)) % MOD;
			//num = (num + (ll)(MOD + offset)*choose(evenq + oddq - 1, i)) % MOD;
		//}
	}
	return (ll)num*ip2[evenq + oddq] % MOD;
}

void solve() {
	inv[1] = 1; FORE(i, 2, n) inv[i] = (ll)(MOD - MOD / i)*inv[MOD%i] % MOD;
	fac[0] = 1; FORE(i, 1, n) fac[i] = (ll)fac[i - 1] * i%MOD;
	ifac[0] = 1; FORE(i, 1, n) ifac[i] = (ll)ifac[i - 1] * inv[i] % MOD;
	ip2[0] = 1; FORE(i, 1, n) ip2[i] = (ll)ip2[i - 1] * INV2%MOD;

	int evenq = 0, oddq = 0, evenw = 0, oddw = 0;
	REP(i, n) if (s[i] == '?') (i % 2 == 0 ? evenq : oddq)++; else if (s[i] == 'w') (i % 2 == 0 ? evenw : oddw)++;

	asum = bsum = csum = dsum = CombSum();
	qans[0] = calc(evenq, oddq, evenw, oddw);
	REP(i, nq) {
		int idx = qidx[i]; char c = qc[i];
		if (s[idx] == '?') (idx % 2 == 0 ? evenq : oddq)--; else if (s[idx] == 'w') (idx % 2 == 0 ? evenw : oddw)--;
		s[idx] = c;
		if (s[idx] == '?') (idx % 2 == 0 ? evenq : oddq)++; else if (s[idx] == 'w') (idx % 2 == 0 ? evenw : oddw)++;
		qans[i + 1] = calc(evenq, oddq, evenw, oddw);
	}
}

void run() {
	scanf("%d%d", &n, &nq);
	cin >> s;
	REP(i, nq) scanf("%d %c", &qidx[i], &qc[i]), --qidx[i];
	solve();
	REPE(i, nq) printf("%d\n", qans[i]);
}

int main() {
	run();
	return 0;
}