#arc104d. [arc104_d]Multiset Mean

[arc104_d]Multiset Mean

Problem Statement

Given positive integers N,KN, K and MM, solve the following problem for every integer xx between 11 and NN (inclusive):

  • Find the number, modulo MM, of non-empty multisets containing between 00 and KK (inclusive) instances of each of the integers 1,2,3cdots,N1, 2, 3 \\cdots, N such that the average of the elements is xx.

Constraints

  • 1leqN,Kleq1001 \\leq N, K \\leq 100
  • 108leqMleq109+910^8 \\leq M \\leq 10^9 + 9
  • MM is prime.
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN KK MM

Output

Use the following format:

c1c_1 c2c_2 :: cNc_N

Here, cxc_x should be the number, modulo MM, of multisets such that the average of the elements is xx.


Sample Input 1

3 1 998244353

Sample Output 1

1
3
1

Consider non-empty multisets containing between 00 and 11 instance(s) of each of the integers between 11 and 33. Among them, there are:

  • one multiset such that the average of the elements is k=1k = 1: 1\\{1\\};
  • three multisets such that the average of the elements is k=2k = 2: 2,1,3,1,2,3\\{2\\}, \\{1, 3\\}, \\{1, 2, 3\\};
  • one multiset such that the average of the elements is k=3k = 3: 3\\{3\\}.

Sample Input 2

1 2 1000000007

Sample Output 2

2

Consider non-empty multisets containing between 00 and 22 instances of each of the integers between 11 and 11. Among them, there are:

  • two multisets such that the average of the elements is k=1k = 1: 1,1,1\\{1\\}, \\{1, 1\\}.

Sample Input 3

10 8 861271909

Sample Output 3

8
602
81827
4054238
41331779
41331779
4054238
81827
602
8