P4726 [Template] Polynomial Exponential Function (Polynomial exp).

Description

Given a polynomial $A(x)$ of degree $n - 1$, find a polynomial $B(x)$ modulo $x^n$ such that $B(x) \equiv \text e^{A(x)}$. All coefficients are taken modulo $998244353$.

Input Format

The first line contains an integer $n$. The next line contains $n$ integers, representing the coefficients $a_0, a_1, \cdots, a_{n-1}$ of the polynomial in order. It is guaranteed that $a_0 = 0$.

Output Format

Output $n$ integers, representing the coefficients $a_0, a_1, \cdots, a_{n-1}$ of the answer polynomial.

Explanation/Hint

For $100\%$ of the testdata, $n \le 10^5$. Translated by ChatGPT 5