#include <bits/stdc++.h>
using namespace std;

#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define pii pair<int,int>
#define pll pair<ll,ll>
#define ppii pair<int,pair<int,int>>
#define vi vector<int>
#define vll vector<ll>
#define vpii vector<pii>
#define vppii vector<ppii>
#define vpll vector<pll>
#define vvi vector<vector<int>>
#define vvll vector<vector<ll>>
#define vvpll vector<vector<pll>>
#define vvpii vector<vector<pii>>
#define mii map<int,int>
#define mll map<ll,ll>
#define rep(i,a,b) for(ll i=(a);i<(b);i++)
#define per(i,b,a) for(ll i=(b);i>=(a);i--)
#define LLmin LLONG_MIN
#define LLmax LLONG_MAX

typedef long long ll;
typedef unsigned long long ull;
typedef long double lld;

const ll mod = 998244353;
const ll N =1e5+10;
const ll inf=1e18;
const ll ninf=-1e18;

ll gcd(ll, ll);
ll modPower(ll, ll, ll);
ll power(ll, ll);
ll modInverse(ll, ll);


ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
ll modPower(ll x, ll y, ll m)
{
    if (y == 0)return 1;
    ll p = modPower(x, y / 2, m) % m;
    p = (p * p) % m;
    return (y % 2 == 0) ? p : (x * p) % m;
}
ll power(ll x, ll y)
{
    if (y == 0)return 1;
    ll p = power(x, y / 2);
    p = (p * p);
    return (y % 2 == 0) ? p : (x * p);
}
ll modInverse(ll a, ll m)
{
    return ((modPower(a, m - 2, m) + mod) % mod);
}

// Function to compute a/b under modlo m
ll modDivide(ll a, ll b, ll m)
{
    a = a % m;
    ll inv = modInverse(b, m);
    if (inv == -1)
       return 0;
    else
       return (inv * a) % m;
}



struct comparepq{
    bool operator()(pii a,pii b){
        if(a.ss==b.ss) return a.ff>b.ff;
        return a.ss<b.ss;
    }
};


bool myCompare(pii a,pii b){
     if(a.ss==b.ss) return a.ff<b.ff;  
    return a.ss>b.ss;
}

/*------------------------------------CODE STARTS HERE------------------------------------------------*/
ll factorial[N+1];
ll invfactorial[N+1];
ll nCr(ll n,ll r){
    // just calculate factorial till N before using it.
    if(r>n) return 0;
    ll ans=((factorial[n] * invfactorial[r] )%mod * invfactorial[n-r] ) %mod;
    if(ans<0) ans+=mod; 
    return ans;
}

void calcFac(){
	factorial[0] = 1;
	invfactorial[0] = 1;
	for (int i = 1; i <= N; i++) {
    	factorial[i] = factorial[i - 1] * i % mod;
		invfactorial[i]=modPower(factorial[i],mod-2,mod);
	}
}

void solve() {
    int n;
    cin>>n;
    
    string s; cin>>s;
    
    int cnt=0, gaps=0;
    rep(i,0,n){
        if(i-1>=0 && s[i]==s[i-1] && s[i]=='1') {cnt++; i++;}
        if(s[i]=='0') gaps++;
    }
    // cout<<cnt<<" "<<gaps<<"\n";
    ll ans=nCr(cnt+gaps,gaps);
    cout<<ans<<"\n";
    return;
}


int main() {
     #ifndef ONLINE_JUDGE
 freopen("in.txt", "r", stdin);
 freopen("out.txt", "w", stdout);
 #endif
    fastIO;
    calcFac();
    ll t = 1;
    cin >> t;
    rep(i, 0, t){
       // cout<<"Case #"<<i+1<<": ";
        solve();
    }
    

    return 0;
}