#P5408. 第一类斯特林数·行

第一类斯特林数·行

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 nn, for every integer i[0,n]i\in[0,n], you need to compute [ni]\begin{bmatrix}n\\ i\end{bmatrix}.

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

Input Format

A single line containing a positive integer nn, as described in the statement.

Output Format

Output one line with n+1n+1 non-negative integers.

You need to output, in order, the values of $\begin{bmatrix}n\\ 0\end{bmatrix},\begin{bmatrix}n\\ 1\end{bmatrix},\begin{bmatrix}n\\ 2\end{bmatrix},\dots,\begin{bmatrix}n\\ n\end{bmatrix}$.

3

0 2 3 1

Hint

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

For 100%100\% of the testdata, 1n<2621441\leqslant n< 262144.

Translated by ChatGPT 5