#include #include #include #include #include #include #include #include #include static const int MOD = 1000000007; using ll = long long; using u32 = unsigned; using u64 = unsigned long long; using namespace std; template constexpr T INF = ::numeric_limits::max() / 32 * 15 + 208; int dp[2][101][10001]; int main() { int n, m; cin >> n >> m; dp[0][0][0] = 1; int bi = 0; for (int i = 0; i < 2*n; ++i) { for (int j = 0; j <= n; ++j) { for (int k = 0; k <= n*n; ++k) { dp[!bi][j][k] = 0; } } for (int j = 0; j <= n; ++j) { for (int k = 0; k <= n*n; ++k) { if(!dp[bi][j][k]) continue; if(j+1 <= n && 2*(j+1) >= i+1){ dp[!bi][j+1][k+i-j] += dp[bi][j][k]; // 0を追加 if(dp[!bi][j+1][k+i-j] >= m) dp[!bi][j+1][k+i-j] -= m; } if(2*j >= i+1){ dp[!bi][j][k] += dp[bi][j][k]; if(dp[!bi][j][k] >= m) dp[!bi][j][k] -= m; } } } bi ^= 1; } for (int k = 0; k <= n*n; ++k) { cout << dp[bi][n][k] << "\n"; } return 0; }