|시간 제한||메모리 제한||제출||정답||맞힌 사람||정답 비율|
|5 초 (추가 시간 없음)||512 MB||0||0||0||0.000%|
Vasya studies permutations of length $n$: sequences of $n$ integers such that every integer from $1$ to $n$ occurs in the sequence exactly once. Vasya says a permutation is $k$-interesting if its first $k$ elements are pairwise coprime. By this definition, if a permutation is $i$-interesting, it is also $(i - 1)$-interesting.
Now Vasya wants to find the number of $i$-interesting permutations for all $i$ from $1$ to $n$. If there is no $i$-interesting permutation for a given $i$, Vasya won't bother calculating for larger values of $i$. For example, as numbers $2$ and $4$ are not coprime, there is no $5$-interesting permutation of length $5$.
Vasya does not like huge integers, so he calculates the number of permutations modulo a given integer $m$. Help him do it.
The first line contains two integers $n$ and $m$ ($1 \le n \le 100$, $1 \le m \le 10^9$).
Print $k$ lines, where $k$ is the maximum number such that there is at least one $k$-interesting permutation of length $n$. On the $i$-th line, print the remainder modulo $m$ of the number of $i$-interesting permutations of length $n$.
120 108 84 48
0 4 4