#include using namespace std; using ll=long long; constexpr int mod=998244353; void ch(ll &a,ll b){ a=(a+b)%mod; } long long modpow(long long a,int n){ long long ret=1,t=a; for(int i=0;i<30;i++){ if(n>>i&1)ret=ret*t%mod; t=t*t%mod; } return ret; } ll fac[300000]; ll inv[300000]; ll invf[300000]; ll modcomb(int n,int r){ if(r<0)return 0; if(n>N>>K; fac[0]=inv[0]=invf[0]=1; fac[1]=inv[1]=invf[1]=1; for(int i=2;i<300000;i++){ fac[i]=fac[i-1]*i%mod; inv[i]=inv[mod%i]*(mod-mod/i)%mod; invf[i]=invf[i-1]*inv[i]%mod; } ll ans=0; if(N==1){ int ans1[7]={1,1,3,3,3,1,1}; cout<