#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; long dp[110][110][10110] = {}; int main() { long n, mod; cin >> n >> mod; dp[0][0][0] = 1; for (int i = 0; i < n; i++) { for (int j = 0; j <= i; j++) { for (int k = 0; k <= n * n; k++) { dp[i + 1][j][k + j] += dp[i][j][k]; dp[i + 1][j][k + j] %= mod; } } for (int j = 1; j <= i + 1; j++) { for (int k = 0; k <= n * n; k++) { dp[i + 1][j][k] += dp[i + 1][j - 1][k]; } } } for (int i = 0; i <= n * n; i++) { cout << dp[n][n - 1][i] << endl; } }