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 <stdio.h>

#define N	200000
#define MD	998244353
#define V2	499122177

int min(int a, int b) { return a < b ? a : b; }
int max(int a, int b) { return a > b ? a : b; }

int abs_(int x) { return x > 0 ? x : -x; }

int vv[N + 1], ff[N + 1], gg[N + 1], ip2[N + 1];

void init() {
	int i;

	ff[0] = gg[0] = ip2[0] = 1;
	for (i = 1; i <= N; i++) {
		vv[i] = i == 1 ? 1 : (long long) vv[i - MD % i] * (MD / i + 1) % MD;
		ff[i] = (long long) ff[i - 1] * i % MD;
		gg[i] = (long long) gg[i - 1] * vv[i] % MD;
		ip2[i] = (long long) ip2[i - 1] * V2 % MD;
	}
}

int ch(int n, int k) {
	return k < 0 || k > n ? 0 : (long long) ff[n] * gg[k] % MD * gg[n - k] % MD;
}

int sum(int n, int l, int r) {
	int i, x;

	x = 0;
	for (i = max(l, 0); i <= min(r, n); i++)
		x = (x + ch(n, i)) % MD;
	return x;
}

long long ans;
int n, kw, kb, kq, kq_, l1, r1, l2, r2, x1, y1, x2, y2;

void wiggle() {	/* maintain x1 = sum(kq_ - 1, l1 - 1, r1), y1 = sum(kq_ - 2, l1 - 2, r1 - 1), x2 = sum(kq_ - 1, l2 - 1, r2), y2 = sum(kq_ - 2, l2 - 2, r2 - 1) */
	while (kq_ < kq) {
		if (l1 - 1 <= r1) {
			x1 = ((long long) x1 * 2 + ch(kq_ - 1, l1 - 2) - ch(kq_ - 1, r1)) % MD;
			y1 = ((long long) y1 * 2 + ch(kq_ - 2, l1 - 3) - ch(kq_ - 2, r1 - 1)) % MD;
		}
		if (l2 - 1 <= r2) {
			x2 = ((long long) x2 * 2 + ch(kq_ - 1, l2 - 2) - ch(kq_ - 1, r2)) % MD;
			y2 = ((long long) y2 * 2 + ch(kq_ - 2, l2 - 3) - ch(kq_ - 2, r2 - 1)) % MD;
		}
		if (kq_++ == 1)
			x1 = sum(kq_ - 1, l1 - 1, r1), y1 = sum(kq_ - 2, l1 - 2, r1 - 1), x2 = sum(kq_ - 1, l2 - 1, r2), y2 = sum(kq_ - 2, l2 - 2, r2 - 1);
	} 
	while (kq_ > kq) {
		kq_--;
		if (l1 - 1 <= r1) {
			x1 = ((long long) x1 - ch(kq_ - 1, l1 - 2) + ch(kq_ - 1, r1)) * V2 % MD;
			y1 = ((long long) y1 - ch(kq_ - 2, l1 - 3) + ch(kq_ - 2, r1 - 1)) * V2 % MD;
		}
		if (l2 - 1 <= r2) {
			x2 = ((long long) x2 - ch(kq_ - 1, l2 - 2) + ch(kq_ - 1, r2)) * V2 % MD;
			y2 = ((long long) y2 - ch(kq_ - 2, l2 - 3) + ch(kq_ - 2, r2 - 1)) * V2 % MD;
		}
	}
	while (l1 > 0) {
		l1--;
		if (l1 - 1 <= r1) {
			x1 = (x1 + ch(kq_ - 1, l1 - 1)) % MD;
			y1 = (y1 + ch(kq_ - 2, l1 - 2)) % MD;
		}
	}
	while (l1 <= kq_ && (kw + l1) % 2 != n / 2 % 2) {
		if (l1 - 1 <= r1) {
			x1 = (x1 - ch(kq_ - 1, l1 - 1)) % MD;
			y1 = (y1 - ch(kq_ - 2, l1 - 2)) % MD;
		}
		l1++;
	}
	while (r1 < kq_ && kw - kb + (r1 + 1) * 2 - kq_ < 0) {
		r1++;
		if (l1 - 1 <= r1) {
			x1 = (x1 + ch(kq_ - 1, r1)) % MD;
			y1 = (y1 + ch(kq_ - 2, r1 - 1)) % MD;
		}
	}
	while (r1 >= 0 && (r1 > kq_ || kw - kb + r1 * 2 - kq_ >= 0 || (kw + r1) % 2 != n / 2 % 2)) {
		if (l1 - 1 <= r1) {
			x1 = (x1 - ch(kq_ - 1, r1)) % MD;
			y1 = (y1 - ch(kq_ - 2, r1 - 1)) % MD;
		}
		r1--;
	}
	while (l2 > 0 && kw - kb + (l2 - 1) * 2 - kq_ >= 0) {
		l2--;
		if (l2 - 1 <= r2) {
			x2 = (x2 + ch(kq_ - 1, l2 - 1)) % MD;
			y2 = (y2 + ch(kq_ - 2, l2 - 2)) % MD;
		}
	}
	while (l2 <= kq_ && (kw - kb + l2 * 2 - kq_ < 0 || (kw + l2) % 2 != n / 2 % 2)) {
		if (l2 - 1 <= r2) {
			x2 = (x2 - ch(kq_ - 1, l2 - 1)) % MD;
			y2 = (y2 - ch(kq_ - 2, l2 - 2)) % MD;
		}
		l2++;
	}
	while (r2 < kq_) {
		r2++;
		if (l2 - 1 <= r2) {
			x2 = (x2 + ch(kq_ - 1, r2)) % MD;
			y2 = (y2 + ch(kq_ - 2, r2 - 1)) % MD;
		}
	}
	while (r2 >= 0 && (r2 > kq_ || (kw + r2) % 2 != n / 2 % 2)) {
		if (l2 - 1 <= r2) {
			x2 = (x2 - ch(kq_ - 1, r2)) % MD;
			y2 = (y2 - ch(kq_ - 2, r2 - 1)) % MD;
		}
		r2--;
	}
}

int main() {
	static char cc[N + 1];
	int q, i, ans;

	init();
	scanf("%d%d%s", &n, &q, cc);
	for (i = 0; i < n; i++) {
		if (i % 2 == 1)
			cc[i] = cc[i] == '?' ? '?' : (cc[i] == 'w' ? 'b' : 'w');
		if (cc[i] == 'w')
			kw++;
		else if (cc[i] == 'b')
			kb++;
		else
			kq++;
	}
	l1 = 0, r1 = -2, l2 = 0, r2 = -2;
	wiggle();
	if (kq == 1)
		ans = abs_(kw % 2 == n / 2 % 2 ? (kw - kb - 1) / 4 : (kw - kb + 1) / 4);
	else {
		ans = 0;
		ans = (ans + (long long) x1 * (kq - kw + kb) - (long long) y1 * kq * 2) % MD;
		ans = (ans + (long long) x2 * (kw - kb - kq) + (long long) y2 * kq * 2) % MD;
		ans = (long long) ans * ip2[kq - 1] % MD * ip2[2] % MD;
	}
	if (ans < 0)
		ans += MD;
	printf("%d\n", ans);
	while (q--) {
		static char s[2];
		char c;

		scanf("%d%s", &i, s), i--, c = s[0];
		if (i % 2 == 1)
			c = c == '?' ? '?' : (c == 'w' ? 'b' : 'w');
		if (cc[i] == 'w')
			kw--;
		else if (cc[i] == 'b')
			kb--;
		else
			kq--;
		cc[i] = c;
		if (cc[i] == 'w')
			kw++;
		else if (cc[i] == 'b')
			kb++;
		else
			kq++;
		wiggle();
		if (kq == 1)
			ans = abs_(kw % 2 == n / 2 % 2 ? (kw - kb - 1) / 4 : (kw - kb + 1) / 4);
		else {
			ans = 0;
			ans = (ans + (long long) x1 * (kq - kw + kb) - (long long) y1 * kq * 2) % MD;
			ans = (ans + (long long) x2 * (kw - kb - kq) + (long long) y2 * kq * 2) % MD;
			ans = (long long) ans * ip2[kq - 1] % MD * ip2[2] % MD;
		}
		if (ans < 0)
			ans += MD;
		printf("%d\n", ans);
	}
	return 0;
}