#include using namespace std; using ll = long long; template struct prime_modint { using mint = prime_modint; unsigned int v; prime_modint() : v(0) {} prime_modint(unsigned int a) { a %= MOD; v = a; } prime_modint(unsigned long long a) { a %= MOD; v = a; } prime_modint(int a) { a %= (int)(MOD); if(a < 0)a += MOD; v = a; } prime_modint(long long a) { a %= (int)(MOD); if(a < 0)a += MOD; v = a; } static constexpr int mod() { return MOD; } mint& operator++() {v++; if(v == MOD)v = 0; return *this;} mint& operator--() {if(v == 0)v = MOD; v--; return *this;} mint operator++(int) { mint result = *this; ++*this; return result; } mint operator--(int) { mint result = *this; --*this; return result; } mint& operator+=(const mint& rhs) { v += rhs.v; if(v >= MOD) v -= MOD; return *this; } mint& operator-=(const mint& rhs) { if(v < rhs.v) v += MOD; v -= rhs.v; return *this; } mint& operator*=(const mint& rhs) { v = (unsigned int)((unsigned long long)(v) * rhs.v % MOD); return *this; } mint& operator/=(const mint& rhs) { return *this = *this * rhs.inv(); } mint operator+() const { return *this; } mint operator-() const { return mint() - *this; } mint pow(long long n) const { assert(0 <= n); mint r = 1, x = *this; while (n) { if (n & 1) r *= x; x *= x; n >>= 1; } return r; } mint inv() const { assert(v); return pow(MOD - 2); } friend mint operator+(const mint& lhs, const mint& rhs) { return mint(lhs) += rhs; } friend mint operator-(const mint& lhs, const mint& rhs) { return mint(lhs) -= rhs; } friend mint operator*(const mint& lhs, const mint& rhs) { return mint(lhs) *= rhs; } friend mint operator/(const mint& lhs, const mint& rhs) { return mint(lhs) /= rhs; } friend bool operator==(const mint& lhs, const mint& rhs) { return (lhs.v == rhs.v); } friend bool operator!=(const mint& lhs, const mint& rhs) { return (lhs.v != rhs.v); } friend std::ostream& operator << (std::ostream &os, const mint& rhs) noexcept { return os << rhs.v; } }; //using mint = prime_modint<1000000007>; using mint = prime_modint<998244353>; //enumeration enu(200000);のように宣言する template struct enumeration{ int N; vector fact, inv; enumeration() : N(0), fact(1, 1), inv(1, 1) {} enumeration(int _n) : N(_n), fact(_n + 1), inv(_n + 1) { fact[0] = 1; for(int i = 1; i <= N; i++) fact[i] = fact[i - 1] * i; inv[N] = T(1) / fact[N]; for(int i = N; i >= 1; i--) inv[i - 1] = inv[i] * i; } void expand(int lim){ fact.resize(lim + 1); inv.resize(lim + 1); for(int i = N + 1; i <= lim; i++) fact[i] = i * fact[i - 1]; inv[lim] = T(1) / fact[lim]; for(int i = lim; i >= N + 2; i--) inv[i - 1] = i * inv[i]; N = lim; } T Per(int n, int k){ if(k > n) return 0; if(n > N) expand(n); return fact[n] * inv[n - k]; } T C(int n, int k){ if(n < 0 || k < 0 || k > n) return 0; if(n > N) expand(n); return fact[n] * inv[n - k] * inv[k]; } T H(int n, int k){ if(n ==0 && k == 0) return 1; if(n <= 0 || k < 0) return 0; return C(n + k - 1, k); } }; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; int r = 2 * n + 1; vector> dp(n + 1, vector(r + 5)); enumeration enu(r); dp[0][0] = 1; for(int i = 0; i < n; i++){ for(int j = 0; j <= 2 * i; j++){ // j よりも左に挿入 int r = 2 * i - j; dp[i + 1][j + 2] += dp[i][j] * enu.C(j + 1, 2); dp[i + 1][j + 1] += dp[i][j] * (j * r + 1); dp[i + 1][j] += dp[i][j] * enu.C(r + 1, 2); } } for(int i = 0; i < 2 * n + 1; i++){ cout << dp[n][i] << '\n'; } }