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.
// You're not going to master the rest of your life in one day.
// Just relax. Master the day.
// Then just keep doing that every day.
#include <bits/stdc++.h>
using namespace std;

namespace kira{
#define int long long
#define all(x) (x).begin(), (x).end()
template<class T> using v = vector<T>;
template<class T> using vv = vector<vector<T>>;
template<class T> using pq = priority_queue<T>;
template<class T> using pqg = priority_queue<T, vector<T>, greater<T>>;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ", "; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? ", " : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}

#ifdef LOCAL
#define d(x...) cerr << __func__ <<":"<<__LINE__<<" [" << #x << "] = ["; _print(x);
#else
#define d(x...);
#endif

const long double pi = acos(-1.0);
const int dx[4] = {0, 1, 0, -1};
const int dy[4] = {1, 0, -1, 0};
const int dxo[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dyo[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
const int INF = (int)1e18+100;
const int MINF = (int)-1e17+100;
const int MOD = (int)998244353 ;
}

using namespace kira;
// all() , pq<int> for min heap use pqg
// v vv 
// d() for debug
// dx (4directions ) , dy , dxo(8 directions ) , dyo
// INF , MINF(minus ) 
#define TESTCASE 1
const int N = (int)(2e5 + 7);

// binary search , binary search with answer, two pointers ,  dsu , dp , monotonic stack , graph , greedy
// bruteforce , combinatorics  , divide and conqure , sortest paths  , hashing

int bin_power( int val , int deg , int mod ) {
    if ( !deg ) return 1%mod;
    if( deg & 1) {
        return (bin_power( val  , deg-1,mod)*val) %mod;
    }

    int res = bin_power( val , deg>>1 , mod ) ;
    return (res*res )%mod;
}
int fact[N+1],inv_fact[N+1] ; 
void fact_init(){
    fact[0] = 1;
    for( int i = 1; i <=N ; i ++) {
        fact[i] = fact[i-1] * i ;
        fact[i] %= MOD;
    }
}
void inv_fact_init(){
    inv_fact[0] = inv_fact[1] = 1;
    inv_fact[N] = bin_power( fact[N] , MOD -2 ,MOD ) ;
    // invfact [i] = ( i + 1) / ( i + 1 )!  
    for( int i  = N - 1; i >=2 ;i --) {
        inv_fact[i] = ( ( i+1)*inv_fact[i+1])%MOD;
    }
}

int nck ( int n , int k ) {
    if( k < 0 || n < k ) return  0 ;
    int deno = (inv_fact[k] * inv_fact[n-k])%MOD;
    // nck = n! / k! * ( n-k )!
    return (fact[n]* deno)%MOD;
}

void init() {
    fact_init();
    inv_fact_init();

}
void solve(int test_case) {
    int n;cin>>n;
    string s;
    cin>>s;
    int cnt_zero = 0, cnt_groups = 0 ; 
    for(int i =0 ;i<n;i++){
        if( s[i]=='0') cnt_zero++;
        else if(i+1<n and s[i+1]=='1'){
            cnt_groups++;
            i++;
        }
    }

    cout<< nck(cnt_groups+cnt_zero , cnt_zero)<<endl;
}

/*
 * Run Towards your goals. If you're not able to run , then walk.
 * If you're not able to walk then crawl but never ever give up
 *
 * Just keep moving towards your target and
 * make your failures learning experiences to achieve success.
 */
int32_t main() {
    int tt = (int)clock();
    ios::sync_with_stdio(false); 
    cin.tie(0);                  
    cout.tie(0);
    cout<<fixed << setprecision(10);

    init();

    int t = 1;
    if(TESTCASE)
        cin >> t;
    for( int i = 1;i<=t;i++){
        solve(i);
    }
#ifdef LOCAL
    cerr << "TIME = " << (double)(clock() - tt) / CLOCKS_PER_SEC << endl;
#endif
    return 0;
}


