시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB36211450.000%

문제

Let's call an array $[a_1, a_2, \ldots, a_k]$ of positive integers \textbf {phenomenal}, if the product of its elements is equal to the sum of its elements (i.e. if $a_1 a_2 \ldots a_k = a_1 + a_2 + \ldots + a_k$) .

For example, the array $[2, 2]$ is phenomenal, because $2\cdot 2 = 2+2 = 4$, and $[3, 1, 2]$ is phenomenal, because $3\cdot 1 \cdot 2 = 3 + 1 + 2 = 6$, but the array $[2, 3]$ is not phenomenal, as $2\cdot 3 \neq 2+3$.

Let $f(i)$ denote the number of phenomenal arrays of size $i$. It can be shown that for any fixed $i \ge 2$ there is only a finite number of phenomenal arrays of size $i$.

You are given an integer $n$. Find $f(2), f(3), \ldots, f(n)$. As these numbers can be very big, output them modulo $P$, where $P$ is a given prime number.

입력

The only line of the input contains two integers $n, P$ ($2 \le n \le 2\cdot 10^5$, $10^8 \le P \le 10^9$, $P$ is prime).

출력

Output $n-1$ integers --- the values $f(2), f(3), \ldots, f(n)$ modulo $P$.

예제 입력 1

7 804437957

예제 출력 1

1 6 12 40 30 84