N, mod = map(int, input().split()) n = 300 fact = [1] * (n + 1) invfact = [1] * (n + 1) for i in range(1, n): fact[i + 1] = ((i+1) * fact[i]) % mod invfact[n] = pow(fact[n], mod - 2, mod) for i in range(n - 1, -1, -1): invfact[i] = invfact[i + 1] * (i + 1) % mod def comb(n, r): if n < 0 or r < 0 or n - r < 0: return 0 return fact[n] * invfact[r] * invfact[n - r] % mod dp = [[0] * (N + 1) for _ in range(N + 1)] dp[0][0] = 1 p = [0] * 301 for i in range(2, 301): p[i] = pow(i, i - 2, mod) for i in range(N): for j in range(i + 1): dp[i + 1][j] += dp[i][j] dp[i + 1][j] %= mod for k in range(2, N - i + 1): dp[i + k][j + k - 1] += dp[i][j] * comb(N - 1 - i, k - 1) * p[k] dp[i + k][j + k - 1] %= mod for i in range(N): print(dp[N][i])