Tree

아직 제출이 없습니다시간 제한3초메모리 제한1024 MB

문제

We generate two rooted trees with nn vertices in the following way.

The first tree is generated as follows:

  1. Vertex 11 is the root of the tree.
  2. For all i\[2,n]i \in \[2, n], we select one vertex from \[1,i1]\[1, i - 1] as the father of ii.

The second tree is generated as follows:

  1. Vertex nn is the root of the tree.
  2. For all i\[1,n1]i \in \[1, n - 1], we select one vertex from \[i+1,n]\[i + 1, n] as the father of ii.

A way to generate the trees is good if and only if every vertex ii which is a leaf in tree 11 is not a leaf in tree 22, and every vertex ii which is not a leaf in tree 11 is a leaf in tree 22. The root of every tree is not a leaf, regardless of the number of adjacent edges.

Now for all n\[2,N]n \in \[2, N], calculate the number of good ways to generate trees. Two ways are considered different if and only if there exists a vertex ii such that the parent of ii in at least one tree is different in these two ways. You should output the answer modulo MM.

입력

The first line of input contains two integers NN and MM (2N5002 \leq N \leq 500, 10M23010 \leq M \leq 2^{30}).

출력

Output N1N-1 lines: the answers for n=2,3,,Nn = 2, 3, \ldots, N.