// This amazing code is by Eric Sunli Chen. #include using namespace std; template bool get_int(T &x) { char t=getchar(); bool neg=false; x=0; for(; (t>'9'||t<'0')&&t!='-'&&t!=EOF; t=getchar()); if(t=='-')neg=true,t=getchar();if(t==EOF)return false; for(; t<='9'&&t>='0'; t=getchar())x=x*10+t-'0'; if(neg)x=-x;return true; } template void print_int(T x) { if(x<0)putchar('-'),x=-x; short a[20]= {},sz=0; while(x>0)a[sz++]=x%10,x/=10; if(sz==0)putchar('0'); for(int i=sz-1; i>=0; i--)putchar('0'+a[i]); } #define ff first #define ss second #define pb push_back #define mp make_pair #define get1(a) get_int(a) #define get2(a,b) (get1(a)&&get1(b)) #define get3(a,b,c) (get1(a)&&get2(b,c)) #define printendl(a) print_int(a),puts("") typedef long long LL; typedef unsigned long long uLL; typedef pair pii; const int inf=0x3f3f3f3f; const LL Linf=1ll<<61; const double pi=acos(-1.0); const int mod=998244353; int m,q,f[1<<20]; char s[1<<20]; void pull(int o) { if(s[o]=='0')f[o]=(f[o*2]+f[o*2+1])%mod; else f[o]=(LL)f[o*2]*f[o*2+1]%mod; } void modify(int u,int t) { u+=(1<>=1; pull(u); } } int query(int u) { u+=(1<>1]=='1')ret=(LL)ret*f[u^1]%mod; u>>=1; } return ret; } int main() { get2(m,q); scanf("%s",s+1); for(int i=1;i<=(1<