Interesting Permutations

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

문제

Vasya studies permutations of length nn: sequences of nn integers such that every integer from 11 to nn occurs in the sequence exactly once. Vasya says a permutation is kk-interesting if its first kk elements are pairwise coprime. By this definition, if a permutation is ii-interesting, it is also (i1)(i - 1)-interesting.

Now Vasya wants to find the number of ii-interesting permutations for all ii from 11 to nn. If there is no ii-interesting permutation for a given ii, Vasya won't bother calculating for larger values of ii. For example, as numbers 22 and 44 are not coprime, there is no 55-interesting permutation of length 55.

Vasya does not like huge integers, so he calculates the number of permutations modulo a given integer mm. Help him do it.

입력

The first line contains two integers nn and mm (1n1001 \le n \le 100, 1m1091 \le m \le 10^9).

출력

Print kk lines, where kk is the maximum number such that there is at least one kk-interesting permutation of length nn. On the ii-th line, print the remainder modulo mm of the number of ii-interesting permutations of length nn.