#P5409. 第一类斯特林数·列

第一类斯特林数·列

Description

The Stirling number of the first kind [nm]\begin{bmatrix}n\\ m\end{bmatrix} represents the number of ways to arrange nn distinct elements into mm circular permutations.

Given n,kn, k, for every integer i[0,n]i \in [0, n], you need to compute [ik]\begin{bmatrix}i\\ k\end{bmatrix}.

Since the answer can be very large, you need to output the result modulo 167772161167772161 (225×5+12^{25}\times 5+1, which is a prime).

Input Format

One line with two positive integers n,kn, k, as described in the statement.

Output Format

One line with n+1n+1 non-negative integers.

Output, in order, the values of $\begin{bmatrix}0\\ k\end{bmatrix}, \begin{bmatrix}1\\ k\end{bmatrix}, \begin{bmatrix}2\\ k\end{bmatrix}, \dots, \begin{bmatrix}n\\ k\end{bmatrix}$.

3 2

0 0 1 3

Hint

For 20%20\% of the testdata, n1000n \leqslant 1000.

For 100%100\% of the testdata, 1k,n<1310721 \leqslant k, n < 131072.

Translated by ChatGPT 5