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")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define fi first
#define sc second
#define rep(i,x) for(int i=0;i<x;i++)
#define repn(i,x) for(int i=1;i<=x;i++)
#define SORT(x) sort(x.begin(),x.end())
#define ERASE(x) x.erase(unique(x.begin(),x.end()),x.end())
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
const ll mod = 998244353;
int n,k;
ll t[1005][2005];
ll s[1005][2005];
ll modpow(ll x,ll n){
	ll res=1;
	while(n>0){
		if(n&1) res=res*x%mod;
		x=x*x%mod;
		n>>=1;
	}
	return res;
}
ll F[4005],R[4005];
void make(){
	F[0] = 1;
	for(int i=1;i<4005;i++) F[i] = F[i-1]*i%mod;
	for(int i=0;i<4005;i++) R[i] = modpow(F[i],mod-2);
}
ll C(int a,int b){
	if(a == -1 && b == -1) return 1;
	if(a < 0 || b < 0) return 0;
	return F[a]*R[b]%mod*R[a-b]%mod;
}
int main(){
	t[0][0] = 1; make();
	t[1][0] = 1; for(int i=1;i<2005;i++) t[1][i] = 2;
	for(int i=2;i<1002;i++){
		ll rui = 0;
		for(int j=0;j<2005;j++){
			rui += t[i-1][j];
			rui %= mod;
			t[i][j] = (rui*2LL-t[i-1][j])%mod;
		}
	}
	rep(i,1002){
		rep(j,2005){
			s[i][j] = t[i][j];
			if(j) s[i][j] = (s[i][j]+t[i][j-1])%mod;
		}
	}
	cin >> k >> n;
	for(int i=2;i<=2*k;i++){
		ll ans = 0;
		if(i <= k+1){
			int use = (i-1)/2;
			int ce = 1-i%2;
			int pos = k-use*2-ce;
			if(!ce){
				rep(i,n+1){
					ans += t[use][i] * C(n-i+pos-1,pos-1) % mod;
				}
			}
			else{
				rep(i,n+1){
					ans += s[use][i] * C(n-i+pos-1,pos-1) % mod;
				}
			}
		}
		else{
			int use = (2*k+1-i)/2;
			int ce = 1-i%2;
			int pos = k-use*2-ce;
			if(!ce){
				rep(i,n+1){
					ans += t[use][i] * C(n-i+pos-1,pos-1) % mod;
				}
			}
			else{
				rep(i,n+1){
					ans += s[use][i] * C(n-i+pos-1,pos-1) % mod;
				}
			}
		}
		cout << (ans%mod+mod)%mod << endl;
	}
}