//A tree without skin will surely die. //A man without face will be alive. #include using namespace std; #define int long long #define rep(i,j,k) for(int i=j;i<=k;++i) #define per(i,j,k) for(int i=j;i>=k;--i) #define add(x,y) (x=((x+y>=mod)?(x+y-mod):(x+y))) int const N=1e5+10,mod=998244353; int n,ans,fac[N],inv[N]; inline int qpow(int a,int b){int res=1;while (b){if (b&1) res*=a,res%=mod;a*=a,a%=mod,b>>=1;}return res;} inline void solve(){ cin>>n; rep(A,2,n-2){ int B=n-A,val=fac[n]*inv[A-2]%mod*inv[B-2]%mod*qpow(n-1,mod-2)%mod*qpow(A,mod-2)%mod*qpow(B,mod-2)%mod; add(ans,val*val%mod); } cout<>t; while (t--) solve(); return 0; }