#include using namespace std; const int MOD=998244353,N=2005; inline int mo1(int x){ return x>=MOD?x-MOD:x; } inline void mo(int& x){x>=MOD?x-=MOD:0;} vector e[N]; int dep[N],cnt[N]; void dfs(int x,int pre){ dep[x]=dep[pre]+1; cnt[dep[x]]++; for(auto y:e[x]) if(y!=pre) dfs(y,x); } int dfs1(int x,int pre){ int ret=1; for(auto y:e[x]) if(y!=pre) ret=max(ret,dfs1(y,x)+1); return ret; } bool vis[N]; int main(){ int T; scanf("%d",&T); while(T--){ int n; scanf("%d",&n); for(int i=1;i<=n;++i) e[i].clear(); for(int i=1;i=1;--i) cnt[i]=1ll*cnt[i+1]*cnt[i]%MOD; mo(ans+=cnt[1]); for(int y=1;y