#include using namespace std; #define Mod(x) (x>=P)&&(x-=P) #define rep(i,a,b) for(ll i=a,i##end=b;i<=i##end;++i) #define drep(i,a,b) for(ll i=a,i##end=b;i>=i##end;--i) #define erep(i,a,b) for(ll i=hd[a];i;i=nxt[i]) typedef long long ll; void Max(ll &x,ll y){xy&&(x=y);} bool vio; char IO; ll rd(ll res=0){ scanf("%d",&res); return res; } const ll M=215,P=998244353; ll A[M*M],B[M*M],W[M*M],deg[M]; ll C[M][M]; ll n,m,k; struct Mtx{ ll A[M][M]; Mtx(){memset(A,0,sizeof A);} void operator *=(const Mtx &_){ rep(i,1,2*n)rep(j,1,2*n){ unsigned long long tmp=0; for(ll k=1;k<=iend;k+=6){ tmp+=1ll*A[i][k]*_.A[k][j]; tmp+=1ll*A[i][k+1]*_.A[k+1][j]; tmp+=1ll*A[i][k+2]*_.A[k+2][j]; tmp+=1ll*A[i][k+3]*_.A[k+3][j]; tmp+=1ll*A[i][k+4]*_.A[k+4][j]; tmp+=1ll*A[i][k+5]*_.A[k+5][j]; //tmp+=1ll*A[i][k+6]*_.A[k+6][j]; //tmp+=1ll*A[i][k+7]*_.A[k+7][j]; tmp%=P; } C[i][j]=tmp; } rep(i,1,2*n)rep(j,1,2*n)A[i][j]=C[i][j]; } void set(){ rep(i,1,2*n)A[i][i]=1; } void clear(){ rep(i,1,2*n)rep(j,1,2*n)A[i][j]=0; } }f[2]; ll Pow(ll a,ll b){ ll res=1; for(;b;b>>=1,a=1ll*a*a%P) if(b&1)res=1ll*res*a%P; return res; } Mtx Powm(Mtx a,ll b){ Mtx res; res.set(); for(;b;b>>=1,a*=a) if(b&1)res*=a; return res; } bool let; int main(){ //cerr<<(&vio-&let)/1024.0/1024<