#include int main() { int N, M; scanf("%d %d", &N, &M); int i, j, k, cur, prev, dp[2][102][10001] = {}; for (i = 1, cur = 1, prev = 0, dp[0][0][0] = 1; i <= N * 2; i++, cur ^= 1, prev ^= 1) { for (j = 0; j <= N; j++) for (k = 0; k <= N * N; k++) dp[cur][j][k] = 0; for (k = 0; k <= N * N; k++) dp[cur][1][k] = dp[prev][0][k]; for (j = 1; j <= N; j++) { for (k = 0; k <= N * N; k++) { if (dp[prev][j][k] == 0) continue; dp[cur][j-1][k+N-(i+j-1)/2] += dp[prev][j][k]; dp[cur][j+1][k] += dp[prev][j][k]; } } for (j = 0; j <= N; j++) for (k = 0; k <= N * N; k++) if (dp[cur][j][k] >= M) dp[cur][j][k] -= M; } for (i = 0; i <= N * N; i++) printf("%lld\n", dp[prev][0][i]); fflush(stdout); return 0; }