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: Accepted)

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define jizz ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define ll long long
#define pb push_back
#define MEM(i,j) memset(i,j,sizeof i)
#define F first
#define S second
#define MP make_pair
#define pii pair<int,int>
#define pll pair<ll,ll>
#define ET cout << "\n"
#define DB(a,s,e) {for(int i=s;i<e;++i) cout << a[i] << " ";ET;}
using namespace std;

const ll MOD=998244353;

ll dp[2001][2001],dp2[2001][2001];

ll solve(ll x,ll t,ll n)
{
	ll ans=dp[t-x][n];
	for(int i=1;i<=n;++i)
		ans=(ans+dp2[x][i]*dp[t-x][n-i])%MOD;
	return ans;
}

int main()
{jizz
	ll n,k,ans,t,x;
	cin >> k >> n;
	dp[0][0]=dp[1][0]=1;
	for(int i=1;i<=k;++i,dp[i][0]=1)
		for(int j=1;j<=n;++j)
			dp[i][j]=(dp[i][j-1]+dp[i-1][j])%MOD;
	dp2[0][0]=1,dp2[1][0]=1;
	for(int i=1;i<=k;++i,dp2[i][0]=1)
		for(int j=1;j<=n;++j)
			dp2[i][j]=(dp2[i-1][j]+dp2[i-1][j-1]+dp2[i][j-1])%MOD;
	for(int i=2;i<=2*k;++i)
	{
		t=k,x=0;
		for(int j=1;j<(i+1)/2;++j)
			if(i-j<=k) --t,++x;
		if(i&1) cout << solve(x,t,n) << "\n";
		else cout << (solve(x,t-1,n)+solve(x,t-1,n-1))%MOD << "\n"; 
	}
}