ll@T;modint().setmod(998244353);rep(T){ll@N,@K;wt(sum[k,2,K+2](modint(k).pw(N)));}