n, mod = map(int, input().split()) fact = [1] for i in range(1, 301): fact.append(fact[-1] * i % mod) inv = [1] * 301 for i in range(1, 301): inv[i] = pow(fact[i], mod - 2, mod) def binom(a, b): if a < 0 or b < 0 or a < b: return 0 return fact[a] * inv[b] * inv[a - b] % mod c = [0, 0] for i in range(2, 301): c.append(pow(i, i - 2, mod)) dp = [[0] * n for _ in range(n + 1)] dp[0][0] = 1 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] * binom(n - i - 1, k - 1) * c[k] dp[i + k][j + k - 1] %= mod print(*dp[n], sep = "\n")