import std; void main () { int N = readln.chomp.to!int; solve(N); } void solve (int N) { const int MOD = 998244353; const int MAX = 2100; long[] fact = new long[](MAX); long[] factInv = new long[](MAX); fact[0] = factInv[0] = 1; for (int i = 1; i < MAX; i++) { (fact[i] = i*fact[i-1]) %= MOD; factInv[i] = modInv(fact[i], MOD); } long comb (long n_, long k_, const int MOD) { int n = cast(int) n_, k = cast(int) k_; if (n < k) return 0; long res = fact[n]; res *= factInv[k]; res %= MOD; res *= factInv[n-k]; res %= MOD; return res; } /* ナイーブなdpを試してみる */ long[][][] dp = new long[][][](N+1, 2*N+1, 2*N+1); // dp[i][j][k] := 操作i回終了後、左にj個/右にk個残っている場合の数 long[] ans = new long[](2*N+1); for (int x = 1; x <= 2*N+1; x++) { foreach (dd; dp) foreach (d; dd) d[] = 0; /* 初期状態 */ dp[0][x-1][2*N+1-x] = 1; foreach (i; 0..N) { foreach (j; 0..2*N+1) foreach (k; 0..2*N+1) { /* 左の二個を抜く */ if (1 <= j-2) (dp[i+1][j-2][k] += comb(j-1, 2, MOD) * dp[i][j][k]) %= MOD; /* 右の二個を抜く */ if (1 <= k-2) (dp[i+1][j][k-2] += comb(k-1, 2, MOD) * dp[i][j][k]) %= MOD; /* 左右を抜く */ if (1 <= j && 1 <= k && 0 < dp[i][j][k]) (dp[i+1][j-1][k-1] += ((1 + comb(j-1, 1, MOD) * comb(k-1, 1, MOD)) * dp[i][j][k])) %= MOD; } } ans[x-1] = dp[N][0][0]; } /* 出力 */ foreach (a; ans) writeln(a); } void read(T...)(string S, ref T args) { auto buf = S.split; foreach (i, ref arg; args) { arg = buf[i].to!(typeof(arg)); } } long modPow (long a, long x, const int MOD) { // assertion assert(0 <= x); assert(1 <= MOD); // normalize a %= MOD; a += MOD; a %= MOD; // simple case if (MOD == 1) { return 0L; } if (x == 0) { return 1L; } if (x == 1) { return a; } // calculate long res = 1L; long base = a % MOD; while (x != 0) { if ((x&1) != 0) { res *= base; res %= MOD; } base = base*base; base %= MOD; x >>= 1; } return res; } long modInv (long x, const int MOD) { import std.exception; enforce(1 <= MOD, format("Line : %s, MOD must be greater than 1. Your input = %s", __LINE__, MOD)); return modPow(x, MOD-2, MOD); }