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)

/**
 * Author: hotaruijika
 * Created: 2018.09.13 19:48:27
 */
#include <bits/stdc++.h>
using namespace std;

#define FOR(i, a, b) for (int i = a; i <= b; ++i)
#define REP(i, n) for (int i = 0; i < n; ++i)
#define FORD(i, b, a) for (int i = b; i >= a; --i)

const int MOD = 998244353;

int n, k;
long long C[2222][2222];

int main() {
	REP(i, 2222) {
		C[i][0] = C[i][i] = 1;
		FOR(j, 1, i - 1) C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % MOD;
	}
	cin >> k >> n;
	FOR(i, 2, k << 1) {
		int x = 0, y = 0;
		FOR(j, 1, k) if (i - j != j) {
			if (i - j > 0 && i - j <= k) x++;
			else y++;
		}
		x /= 2;
		//cout << x << "  " << y << "\n";
		long long answer = 0, pw = 1;
		FOR(j, 0, x) {
			if (j) pw = pw * 2 % MOD;
			if (j > n || (!j && y == 0)) continue;
			answer = (answer + pw * C[x][j] % MOD * C[n + y - 1][j + y - 1] % MOD) % MOD;
			if (i % 2 == 0)
				answer = (answer + pw * C[x][j] % MOD * C[n + y - 2][j + y - 1] % MOD) % MOD;
			//cout << pw * C[x][j] % MOD * C[n + y - 1][j + y - 1] % MOD << "\n";
		}
		cout << answer << "\n";
	}
	return 0;
}