Problem:
Score : 700 points

Problem Statement

Takahashi throws N dice, each having K sides with all integers from 1 to K. The dice are NOT pairwise distinguishable.
For each i=2,3,...,2K, find the following value modulo 998244353:

The number of combinations of N sides shown by the dice such that the sum of no two different sides is i.

Note that the dice are NOT distinguishable, that is, two combinations are considered different when there exists an integer k such that the number of dice showing k is different in those two.

Constraints

1 \leq K \leq 2000

2 \leq N \leq 2000

K and N are integers.

Input

Input is given from Standard Input in the following format:

K N

Output

Print 2K-1 integers. The t-th of them (1\leq t\leq 2K-1) should be the answer for i=t+1.

Sample Input 1

3 3

Sample Output 1

7
7
4
7
7

For i=2, the combinations (1,2,2),(1,2,3),(1,3,3),(2,2,2),(2,2,3),(2,3,3),(3,3,3) satisfy the condition, so the answer is 7.

For i=3, the combinations (1,1,1),(1,1,3),(1,3,3),(2,2,2),(2,2,3),(2,3,3),(3,3,3) satisfy the condition, so the answer is 7.

For i=4, the combinations (1,1,1),(1,1,2),(2,3,3),(3,3,3) satisfy the condition, so the answer is 4.

Sample Input 2

4 5

Sample Output 2

36
36
20
20
20
36
36

Sample Input 3

6 1000

Sample Output 3

149393349
149393349
668669001
668669001
4000002
4000002
4000002
668669001
668669001
149393349
149393349

Solution in C++14 (GCC 5.4.1) (judge verdict: Runtime Error)

#include<cstdio>
#include<cstdlib>
#define min(a,b) (a<b?a:b)
const int clz=998244353;
#define mod clz
long long matm(long long val,long long k){
	long long ret=1;
	while(k){
		if(k&1) ret=ret*val%mod;
		k>>=1; val=val*val%mod;
	}
	return ret;
}
int n,k;
long long pw[10005],pu[10005],inv[10005];
inline long long C(int n,int m){return (pu[n]*inv[m]%mod)*inv[n-m]%mod;}
long long getans(int val){
	if(val&1){
		long long ans=0;
		int gro=min(k-val/2,val/2);
		int p=k-gro*2;
		if(p==0) exit(0);
		for(int i=0;i<=gro;i++) {(ans+=C(n+p-1,i+p-1)*pw[i]%mod)*C(gro,i)%mod; ans%=mod;}
		return ans;
	}
	else{
		long long ans=0;
		int gro=min(k-val/2+1,val/2);
		int p=k-gro*2+1;
		if(p==0) exit(0);
		for(int i=0;i<gro;i++) {ans+=(C(n+p-1,i+p-1)*pw[i]%mod)*C(gro-1,i)%mod; ans%=mod;}
		for(int i=0;i<gro;i++) {ans+=(C(n+p-2,i+p-1)*pw[i]%mod)*C(gro-1,i)%mod; ans%=mod;}
		return ans;
	}
}
int main(){
	pu[0]=pw[0]=1;
	for(int i=1;i<=10000;i++) pu[i]=pu[i-1]*i%mod;
	for(int i=1;i<=10000;i++) pw[i]=pw[i-1]*2%mod;
	inv[10000]=matm(pu[10000],mod-2);
	for(int i=9999;i>=0;i--) inv[i]=inv[i+1]*(i+1)%mod;
	scanf("%d%d",&k,&n);
	for(int i=2;i<=2*k;i++) printf("%lld\n",getans(i));
	return 0;
}