C. Communication Problem
time limit per test
3 seconds
memory limit per test
512 megabytes
input
standard input
output
standard output

One day, Edisonhello, YP, and Baluteshih were testing a programming contest named PDAO. After reading problem A, Edisonhello conceptualized it and explained what to do to their main coder, YP. However, due to a communication problem, YP misinterpreted the description, resulting in an incorrect understanding. As YP found the misunderstood version of the problem difficult enough (and he did not want to waste any piece of code written), he would like to include it as one of the problems in the 2023 NTU ICPC Team Preliminary.

The intended version of the problem in PDAO was:

Given an integer $$$N$$$, for each $$$k = 1, 2, \ldots, N$$$, output

$$$$$$ \max_{(A, B) \in \wp(N, k)} \dfrac{f(A, B)}{\displaystyle \prod_{i = 1}^{k} p_i} $$$$$$

where $$$\wp(N, k)$$$ collects all partitions $$$(A, B)$$$ of $$$S = \{1, 2, \ldots, N\}$$$ such that $$$\begin{cases} A \cap B = \emptyset \\ A \cup B = S \\ |B| = k\end{cases}$$$, $$$f(A, B)$$$ denotes the cardinality of the set $$$\{(a, b) \mid (b \equiv 0 \mod a) \wedge (a, b) \in A \times B\}$$$, and $$$p_i$$$ denotes the $$$i$$$-th smallest prime number (e.g., $$$p_1 = 2, p_2 = 3, p_3 = 5$$$).

YP misunderstood the definition of the denominator in the expression. So the problem you need to solve is instead:

Given an integer $$$N$$$, for each $$$k = 1, 2, \ldots, N$$$, output

$$$$$$ \max_{(A, B) \in \wp(N, k)} \dfrac{f(A, B)}{\displaystyle \prod_{b \in B} b} $$$$$$

where the definition of $$$\wp$$$ and $$$f$$$ remains the same.

Input

The first and only line of the input contains a single integer $$$N$$$.

  • $$$1 \leq N \leq 10^6$$$
Output

Output a single line containing $$$N$$$ space-separated integer, where the $$$i$$$-th number is the answer for $$$k = i$$$. Since YP has no time to write a checker for high-precision floating-point number, please output their congruence modulo $$$998244353$$$. Formally, let $$$M = 998244353$$$. It can be shown that the answer can be expressed as an irreducible fraction $$$\dfrac{p}{q}$$$, where $$$p$$$ and $$$q$$$ are integers and $$$q \not\equiv 0 (\mod M)$$$. Output the integer equal to $$$p \cdot q^{-1} \mod M$$$ for each $$$k = 1, 2, \ldots, N$$$. In other words, for each $$$k = 1, 2, \ldots, N$$$, output such an integer $$$x$$$ that $$$0 \leq x \lt M$$$ and $$$x \cdot q \equiv p \pmod M$$$.

Example
Input
3
Output
499122177 332748118 0