Cirno gave AquaMoon a chessboard of size 1 × n. Its cells are numbered with integers from 1 to n from left to right. In the beginning, some of the cells are occupied with at most one pawn, and other cells are unoccupied.

In each operation, AquaMoon can choose a cell i with a pawn, and do either of the following (if possible): 

  * Move pawn from it to the (i+2)-th cell, if i+2 ≤ n and the (i+1)-th cell is occupied and the (i+2)-th cell is unoccupied. 
  * Move pawn from it to the (i-2)-th cell, if i-2 ≥ 1 and the (i-1)-th cell is occupied and the (i-2)-th cell is unoccupied. 



You are given an initial state of the chessboard. AquaMoon wants to count the number of states reachable from the initial state with some sequence of operations. But she is not good at programming. Can you help her? As the answer can be large find it modulo 998 244 353.

Input

The input consists of multiple test cases. The first line contains a single integer t (1 ≤ t ≤ 10 000) — the number of test cases.

The first line contains a single integer n (1 ≤ n ≤ 10^5) — the size of the chessboard.

The second line contains a string of n characters, consists of characters "0" and "1". If the i-th character is "1", the i-th cell is initially occupied; otherwise, the i-th cell is initially unoccupied.

It is guaranteed that the sum of n over all test cases does not exceed 10^5.

Output

For each test case, print the number of states that reachable from the initial state with some sequence of operations modulo 998 244 353.

Example

Input


6
4
0110
6
011011
5
01010
20
10001111110110111000
20
00110110100110111101
20
11101111011000100010


Output


3
6
1
1287
1287
715

Note

In the first test case the strings "1100", "0110" and "0011" are reachable from the initial state with some sequence of operations.
import sys
import math
import heapq
import bisect
from collections import Counter
from collections import defaultdict
from io import BytesIO, IOBase
import string


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        import os
        self.os = os
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
        self.BUFSIZE = 8192

    def read(self):
        while True:
            b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, self.BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, self.BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            self.os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")


def get_int():
    return int(input())


def get_ints():
    return list(map(int, input().split(' ')))


def get_int_grid(n):
    return [get_ints() for _ in range(n)]


def get_str():
    return input().strip()


def get_strs():
    return get_str().split(' ')


def flat_list(arr):
    return [item for subarr in arr for item in subarr]


def yes_no(b):
    if b:
        return "YES"
    else:
        return "NO"


def binary_search(good, left, right, delta=1, right_true=False):
    """
    Performs binary search
    ----------
    Parameters
    ----------
    :param good: Function used to perform the binary search
    :param left: Starting value of left limit
    :param right: Starting value of the right limit
    :param delta: Margin of error, defaults value of 1 for integer binary search
    :param right_true: Boolean, for whether the right limit is the true invariant
    :return: Returns the most extremal value interval [left, right] which is good function evaluates to True,
            alternatively returns False if no such value found
    """

    limits = [left, right]
    while limits[1] - limits[0] > delta:
        if delta == 1:
            mid = sum(limits) // 2
        else:
            mid = sum(limits) / 2
        if good(mid):
            limits[int(right_true)] = mid
        else:
            limits[int(~right_true)] = mid
    if good(limits[int(right_true)]):
        return limits[int(right_true)]
    else:
        return False


def prefix_sums(a):
    p = [0]
    for x in a:
        p.append(p[-1] + x)
    return p


def solve_a():
    n = get_int()
    a = get_ints()
    b = get_ints()
    if sum(a) != sum(b):
        print(-1)
        return
    else:
        less = []
        more = []
        for i, x in enumerate(a):
            if x > b[i]:
                more.extend([i] * (x - b[i]))
            elif x < b[i]:
                less.extend([i] * (b[i] - x))
    print(len(more))
    while less:
        print(more.pop() + 1, less.pop() + 1)
    return


def solve_b():
    n, m = get_ints()

    letters = string.ascii_lowercase
    alpha = {x: i for (i, x) in enumerate(letters)}

    G = [[0] * 26 for _ in range(m)]
    H = [[0] * 26 for _ in range(m)]
    for _ in range(n):
        s = list(get_str())
        for j in range(m):
            G[j][alpha[s[j]]] += 1
    for _ in range(n - 1):
        s = list(get_str())
        for j in range(m):
            H[j][alpha[s[j]]] += 1

    ans = []
    for j in range(m):
        for c in range(26):
            if G[j][c] > H[j][c]:
                ans.append(letters[c])
                break

    print(''.join(ans), flush=True)
    return


def solve_c():
    n = get_int()
    a = get_ints()
    b = sorted(a)
    d = defaultdict(int)
    e = defaultdict(int)
    for i in range(n):
        d[(a[i], i % 2)] += 1
        e[(b[i], i % 2)] += 1

    for k, i in d:
        if d[(k, i)] != e[(k, i)]:
            print("NO")
            return

    print("YES")
    return



def inv_mod(a, M):
    '''
    Returns the inverse of a modulo M (prime), uses Fermat's Little Theorem.
    Time complexity: O(log M) - fast exponentiation
    Memory complexity: O(1)
    :param a: number to invert
    :param M: modulo base, must be prime
    :return: returns inverse of a modulo M
    '''
    return pow(a, M - 2, M)


def choices(n, M):
    '''
    Returns an array of binomial co-efficients (n choose k) modulo M, for k in {0, 1, ..., n}
    Time complexity: O(n log M)
    Memory complexity: O(n)
    :param n: upper index for the binomial co-efficients
    :param M: modulo base, usually (large) prime
    :return: array of kth binomial co-efficients, modulo M
    '''
    # Initialise array and n choose 0
    ret = [0] * (n + 1)
    ret[0] = 1
    # Loop over k in {1, ..., n} and define n choose k, inductively
    for k in range(1, n + 1):
        ret[k] = (ret[k - 1] * (n - k + 1) * inv_mod(k, M)) % M
    # Return array of binomial co-efficients
    return ret


def solve_d():
    M = 998244353
    n = get_int()
    s = get_str()
    half = False
    group = 0
    zero = 0
    for i, x in enumerate(s):
        if x == '1':
            if half:
                group += 1
                half = False
            else:
                half = True
        else:
            half = False
            zero += 1

    return choices(zero + group, M)[group]



t = get_int()
for _ in range(t):
    print(solve_d())
