import sys def input(): return sys.stdin.readline().rstrip() """ Do not get stuck on a problem for more than 20 minutes Just check the editorial :) There should be something else to do insead """ MAXN = 100 MAXINV = MAXN * MAXN DP0 = [[0]*(MAXINV + MAXN + 10) for i in range(MAXN + 10)] DP1 = [[0]*(MAXINV + MAXN + 10) for i in range(MAXN + 10)] def slv(): #DP[i][dif][inverse] N,M = map(int,input().split()) DP0[0][0] = 1 for i in range(2 * N): if i % 2 == 0: #DP0 -> DP1 for dif in range(MAXN + 1): for inv in range(MAXINV + 1): DP1[dif][inv] = 0 for dif in range(MAXN + 1): for inv in range(MAXINV + 1): v = DP0[dif][inv] % M DP1[dif + 1][inv + (i - dif) // 2] += v DP1[dif - 1][inv] += v else: #DP1 -> DP0 for dif in range(MAXN + 1): for inv in range(MAXINV + 1): DP0[dif][inv] = 0 for dif in range(MAXN + 1): for inv in range(MAXINV + 1): v = DP1[dif][inv] % M DP0[dif + 1][inv + (i - dif) // 2] += v DP0[dif - 1][inv] += v ans = DP0[0] for i in range(N * N + 1): print(ans[i]) return def main(): t = 1 for i in range(t): slv() return if __name__ == "__main__": main()