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 static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;
import java.util.*;
import java.io.*;

public class A
{
    static int n;
    static int[] arr;
    static char[] s;
    public static void main(String[] args) throws IOException
    {
        f = new Flash();
        out = new PrintWriter(System.out);
        compute();
        int T = ni();
        for(int tc = 1; tc <= T; tc++){
        	n = ni(); s = nc(); sop(fn());
        }
        
        out.flush(); out.close();
    }
    
    /*
     * Transform the original array by scanning the elements from left to right. 0->a 10->b 11->c
	   e.g. 00111110011->aaccbac Then we could swap c with any adjacent element. 
	   ac=011=110=ca bc=1011=1110=cb So the order of a and b is fixed, and we could insert c into any position.
     */
    static long fn()
    {
        int x = 0, y = 0;
        for(int i = 0; i < n; ) {
        	if(i+1 < n && s[i] == '1' && s[i+1] == '1') {
        		i += 2;
        		y++; x++;
        	}
        	
        	else if(i+1 < n && s[i] == '1' && s[i+1] == '0') {
        		i += 2;
        		x++;
        	}
        	
        	else if(s[i] == '0'){x++; i++;}
        	else i++;
        }
        
        return ncr(x, y);
    }
    
    static long pow(long x, long p){
        long ans = 1;
    	while(p > 0) {
    		if((p&1) == 1) ans = (ans*x) % mod;
    		x = (x*x) % mod;
    		p >>= 1;
    	}
    	
    	return ans;
    }
     
    static long mod_inv(long x){
        return pow(x, mod-2);
    }
     
    static void compute()
    {
        fact = new long[maxN+1]; fact[0] = 1;
        inv = new long[maxN+1]; inv[0] = 1;
        
        for(int i = 1; i < maxN; i++)
            fact[i] = fact[i-1] * i % mod;
            
        inv[maxN - 1] = mod_inv(fact[maxN - 1]);
        
        for (int i = maxN-2; i > 0; i--)
            inv[i] = inv[i+1] * (i+1) % mod;
    }
     
    static long ncr(int n, int r){
        if (n < 0 || r < 0 || n - r < 0) return 0;
        return fact[n] * inv[r] % mod * inv[n-r] % mod;
    }
    
    static Flash f;
    static PrintWriter out;
    static final long mod = (long)998244353;
    static final long inf = (long)1e18;
    static final int _inf = (int)1e9;
    static final int maxN = (int)1e5+5;
    static long[] fact, inv;
    
    static class cpr implements Comparator<int[]>{
    	public int compare(int[] a, int[] b) {
    		return Integer.compare(a[0], b[0]);
    	}
    }
    
    static void sort(int[] a){
        List<Integer> A = new ArrayList<>();
        for(int i : a) A.add(i);
        Collections.sort(A);
        for(int i = 0; i < A.size(); i++) a[i] = A.get(i);
    }
    
    static void sort(long[] a){
        List<Long> A = new ArrayList<>();
        for(long i : a) A.add(i);
        Collections.sort(A);
        for(int i = 0; i < A.size(); i++) a[i] = A.get(i);
    }
    
    static void print(int[] a){
        StringBuilder sb = new StringBuilder();
        for(int i = 0; i < a.length; i++) sb.append(a[i] + " ");
        sop(sb);
    }
    
    static void print(long[] a){
        StringBuilder sb = new StringBuilder();
        for(int i = 0; i < a.length; i++) sb.append(a[i] + " ");
        sop(sb);
    }
    
    static int swap(int itself, int dummy){return itself;}
    static long swap(long itself, long dummy){return itself;}
    static char swap(char itself, char dummy){return itself;}
    static void sop(Object o){out.println(o);}
    static int ni(){return f.ni();}
    static long nl(){return f.nl();}
    static double nd(){return f.nd();}
    static String next(){return f.next();}
    static String ns(){return f.ns();}
    static String yes = "YES", no = "NO";
    static char[] nc(){return f.nc();}
    static int[] arr(int len){return f.arr(len);}
    static int gcd(int a, int b){if(b == 0) return a; return gcd(b, a%b);}
    static long gcd(long a, long b){if(b == 0) return a; return gcd(b, a%b);}
    static int fcm(int a, int b){return (a*b)/gcd(a, b);}
    static long fcm(long a, long b){return (a*b)/gcd(a, b);}
    static double log2(long N) {return Math.log(N) / Math.log(2);}
    static void debug(int[] a) {sop(Arrays.toString(a));}
    static void debug(long[] a) {sop(Arrays.toString(a));}
    
    static class Flash
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
        
        String next(){
            while(!st.hasMoreTokens()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch(IOException e){
                    e.printStackTrace();
                }
            }
            
            return st.nextToken();
        }
        
        String ns(){
            String s = new String();
            try{
                s = br.readLine().trim();
            }catch(IOException e){
                e.printStackTrace();
            }
            
            return s;
        }
        
        int[] arr(int n){
            int[] a = new int[n];
            for(int i = 0; i < n; i++) a[i] = ni();
            return a;
        }
        
        char[] nc(){return ns().toCharArray();}
        int ni(){return Integer.parseInt(next());}
        long nl(){return Long.parseLong(next());}
        double nd(){return Double.parseDouble(next());}
    }
}