#include"bits/stdc++.h"
using namespace std;
#define mod 998244353  
#define eps 0.0000001
#define pb push_back
#define int long long int
#define sll signed long long 
#define ull unsigned long long 
#define u_map unordered_map<int,int>
#define vi vector<int>
#define vvi vector<vi>
#define ub upper_bound
#define lb lower_bound 
#define mxi INT_MAX
#define mni INT_MIN
#define mxll LLONG_MAX
#define mnll LLONG_MIN
#define ins insert
#define ff first
#define ss second
#define check cout<<"Check ";
#define inf 100000000000000000
#define pie  3.1415926535
#define f(in,end,it) for(int i=in;i<end;i+=it)
#define fr(in,end,it) for(int i=in;i>=end;i-=it)
#define line cout<<'\n';
#define pii pair<int,int>
#define srt(x) sort(x.begin(),x.end())
#define tt int t;cin>>t;while(t--)
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);
int fact[100005];
int inv_fact[100005];
int powmod(int x, int y) {
    int ans = 1;
    while(y > 0){
        if(y & 1) ans = (ans * x)%mod;
        y = y >> 1;
        x = (x * x)%mod;
    }
    return ans ;
}
int C(int n , int r){
    if(n < r)return 0;
    else return (fact[n] * (inv_fact[n-r]%mod * inv_fact[r]%mod)%mod )%mod;
}
void ans_nikalo(){
  int n;
  cin>>n;
    string s;
    cin>>s;
    int ans=0 ;
    int c=0 ,d =0;
    for(int i=0;i< n;i++){
       if (s[i] == '0') c++;  
        else if (i+1 < n && s[i+1] == '1') {
				d++;
				i++;
			}
        
    }
    ans = C(c+d , d);
    cout<<ans<<"\n";
}
int32_t  main() { 
    #ifndef ONLINE_JUDGE
   freopen("input.txt", "r", stdin);
   freopen("output.txt", "w", stdout);
    #endif   
    fio
   //SieveOfEratosthenes(1000001);
   fact[0] = inv_fact[0] =1;
   for(int i=1;i<= 100004 ;i++){
       fact[i] = (fact[i-1] * i)%mod;
       inv_fact[i] = powmod(fact[i] , mod-2)%mod;
   }
 
    tt ans_nikalo();
         
   return 0; 
}