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 java.io.BufferedInputStream;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;

import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class P1546D {

    private static final int M = 998244353;

    private static long choose(int n, int k) {
        long c = 1;
        k = Math.max(k, n-k);
        for (int i = k+1; i <= n; i++) {
            c = (c * i) % M;
            c = (c * modinv(i-k)) % M;
        }
        return c;
    }

    private static long solve(int n, boolean[] B) {
        boolean p = false;
        int k = 0;
        int m = n;
        for (int i = 0; i < n; i++) {
            if (B[i]) {
                if (p) {
                    k++;
                }
                p = !p;
            } else {
                if (p) {
                    m--;
                    p = false;
                }
            }
        }
        if (p) {
            m--;
        }
        int z = m - 2*k;
        return choose(k + z, z);
    }

    public static void main(String[] args) throws IOException {
        try {
            final FastReader fr = new FastReader(
                new BufferedInputStream(System.in));
            final StringBuilder sb = new StringBuilder();
            for (int t = fr.readInt(); t > 0; t--) {
                final int n = fr.readInt();
                final boolean[] B = new boolean[n];
                for (int i = 0; i < n; i++) {
                    B[i] = (fr.readNonWs() == (byte) '1');
                }
                sb.append(solve(n, B)).append('\n');
            }
            System.out.print(sb);
        } catch (Throwable t) {
            t.printStackTrace(System.out);
            System.exit(1);
        }
    }

    private static final void log(Object o) {
        System.err.println(o);
    }

    private static final void log(String format, Object... args) {
        System.err.println(String.format(null, format, args));
    }

    private static class FastReader implements Closeable {
        private static final byte B_SP = ' ';
        private static final byte B_CR = '\r';
        private static final byte B_LF = '\n';
        private static final byte B_0 = '0';
        private static final byte B_9 = '9';
        private static final byte B_DASH = '-';

        private final InputStream in;
        private byte prev;

        public FastReader(InputStream in) {
            this.in = in;
        }

        public byte read() throws IOException {
            return (prev = (byte) in.read());
        }

        public byte readNonWs() throws IOException {
            byte b;
            do {
                b = read();
            } while (b <= B_SP);
            return b;
        }

        public int readInt() throws IOException {
            byte b = readNonWs();
            final boolean neg = (b == B_DASH);
            if (neg) {
                b = read();
            }
            int i = (b - B_0);
            b = read();
            while (b >= B_0 && b <= B_9) {
                i = i * 10 + (b - B_0);
                b = read();
            }
            return neg ? -i : i;
        }

        public int[] readInts(int n) throws IOException  {
            final int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = readInt();
            }
            return arr;
        }

        public int[][] readInts(int n, int m) throws IOException {
            final int[][] arr = new int[n][m];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    arr[i][j] = readInt();
                }
            }
            return arr;
        }

        public long readLong() throws IOException {
            byte b = readNonWs();
            final boolean neg = (b == B_DASH);
            if (neg) {
                b = read();
            }
            long i = (b - B_0);
            b = read();
            while (b >= B_0 && b <= B_9) {
                i = i * 10 + (b - B_0);
                b = read();
            }
            return neg ? -i : i;
        }

        public long[] readLongs(int n) throws IOException  {
            final long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = readLong();
            }
            return arr;
        }

        public long[][] readLongs(int n, int m) throws IOException  {
            final long[][] arr = new long[n][m];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    arr[i][j] = readLong();
                }
            }
            return arr;
        }

        public int readToken(byte[] tbuf) throws IOException {
            byte b = readNonWs();
            int i = 0;
            do {
                tbuf[i++] = b;
                b = read();
            } while (b >= B_SP);
            return i;
        }

        public int readLine(byte[] lbuf) throws IOException {
            byte b;
            if (prev == B_CR) {
                b = read();
                if (b == B_LF) {
                    b = read();
                }
            } else {
                b = read();
            }
            int i = 0;
            while (b >= B_SP) {
                lbuf[i++] = b;
                b = read();
            }
            return i;
        }

        @Override
        public void close() throws IOException {
            in.close();
        }
    }

    private static int[] toIntArray(final List<Integer> lst) {
        final int[] arr = new int[lst.size()];
        int i = 0;
        for (final int x : lst) {
            arr[i++] = x;
        }
        return arr;
    }

    private static long[] toLongArray(final List<Long> lst) {
        final long[] arr = new long[lst.size()];
        int i = 0;
        for (final long x : lst) {
            arr[i++] = x;
        }
        return arr;
    }

    private static int[][] getDarts(final int n, final int m,
                                    final int[][] E) {
        final List<List<Integer>> darts = new ArrayList<>(n);
        for (int i = 0; i < n; i++) {
            darts.add(new ArrayList<>());
        }
        for (int j = 0; j < m; j++) {
            final int u = E[j][0];
            final int v = E[j][1];
            darts.get(u).add(v);
            darts.get(v).add(u);
        }
        final int[][] D = new int[n][];
        int i = 0;
        for (final List<Integer> lst : darts) {
            D[i++] = toIntArray(lst);
        }
        return D;
    }

    private static final Random rng = new Random();

    private static void shuffle(int[] arr, int lo, int hi) {
        int k = hi - lo;
        for (int i = hi-1; i > lo; i--) {
            int j = lo + rng.nextInt(k--);
            int tmp = arr[i];
            arr[i] = arr[j];
            arr[j] = tmp;
        }
    }

    private static void sort(int[] arr) {
        shuffle(arr, 0, arr.length);
        Arrays.sort(arr);
    }

    private static long modinv(long a) {
        long r0 = a;
        long r1 = M;
        long s0 = 1;
        long s1 = 0;
        long t0 = 0;
        long t1 = 1;
        while (r1 != 0) {
            final long q = r0 / r1;
            final long r2 = r0 - q * r1;
            final long s2 = s0 - q * s1;
            final long t2 = t0 - q * t1;
            r0 = r1;
            r1 = r2;
            s0 = s1;
            s1 = s2;
            t0 = t1;
            t1 = t2;
        }
        if (s0 < M) {
            s0 += M;
        }
        return s0;
    }
}
