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: Wrong Answer)

#include "bits/stdc++.h"
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a),i##_len=(b);i<i##_len;++i)
#define MSVC_UNKO(x) x
#define rep(...) MSVC_UNKO(_overload3(__VA_ARGS__,repi,_rep,_rep)(__VA_ARGS__))
#define all(c) c.begin(),c.end()
#define mp make_pair
#define write(x) cout<<(x)<<"\n"
using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll;
template<class T>using vv = vector<vector<T>>; template<class T>auto vvec(int n, int m, T v) { return vv<T>(n, vector<T>(m, v)); }
template<class T>bool chmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }
template<class T>bool chmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
constexpr int INF = 1 << 29, MOD = 998244353; constexpr ll LINF = 1LL << 60;
struct aaa { aaa() { cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(10); }; }aaaa;
ll mpow(ll x, ll n) { ll y = 1; for (; n > 0; n /= 2) { y = n % 2 ? y * x % MOD : y; x = x * x % MOD; } return y; }
    
struct Combination {
    vector<ll> fact, ifact;
    Combination(int n) : fact(n + 1), ifact(n + 1) {
        fact[0] = 1; for (int i = 0; i < n; ++i) fact[i + 1] = fact[i] * (i + 1) % MOD;
        ifact[n] = mpow(fact[n], MOD - 2); for (int i = n; i > 0; --i) ifact[i - 1] = ifact[i] * i % MOD;
    }
    ll operator ()(int n, int k) { return fact[n] * ifact[n - k] % MOD * ifact[k] % MOD; }
} C(4545);

int main() {
    int K, N;
    cin >> K >> N;

    rep(i, 2, 2 * K + 1) {
        // １個だけでi以上の個数 or 片方がその数字だとiに満たない個数
        int n_NotPair = i < K + 1 ? max(0, K - i + 1) : max(0, i - K - 1);

        ll ans = 0;
        if (i % 2) {
            int n_Pair = (K - n_NotPair) / 2;
            // 2つに割ったペアの使用数
            rep(m, 0, n_Pair + 1) {
                ll tmp = C((N - m) + (m + n_NotPair) - 1, N - m) * mpow(2, m) % MOD;
                ans = (ans + C(n_Pair, m) * tmp % MOD) % MOD;
            }
        }
        else {
            int n_Pair = (K - n_NotPair - 1) / 2;
            // i/2を使わない
            rep(m, 0, n_Pair + 1) {
                ll tmp = C((N - m) + (m + n_NotPair) - 1, N - m) * mpow(2, m) % MOD;
                ans = (ans + C(n_Pair, m) * tmp % MOD) % MOD;
            }

            // i/2を使う i/2は1個まで
            rep(m, 0, n_Pair + 1) {
                ll tmp = C((N - m - 1) + (m + n_NotPair) - 1, N - m - 1) * mpow(2, m) % MOD;
                ans = (ans + C(n_Pair, m) * tmp % MOD) % MOD;
            }
        }

        write(ans);
    }
}