#define MD 998244353
int @N, x = 0; char @S[N];
Comb<Modint> comb;
x += arrCountVal(N,S,@['A','B']);
wt(comb.C(N,x));