P5825 Permutation Ascent Counting

Description

We say a permutation $P$ has $k$ ascents if and only if there exist $k$ positions $i$ such that $P_i < P_{i+1}$. Now given the permutation length $n$, for all integers $k \in [0, n]$, find how many permutations have exactly $k$ ascents.

Input Format

An integer $n$.

Output Format

One line with $n + 1$ integers. The $i$-th integer indicates the number of permutations of length $n$ with exactly $i - 1$ ascents, taken modulo $998244353$.

Explanation/Hint

For $100\%$ of the testdata, $1 \leq n \leq 2 \times 10^5$. Translated by ChatGPT 5