给定一个 $n\times n$ 的矩阵 $A$ ,请求出它的特征多项式 $p(\lambda)=\det(\lambda I-A)$ 。可能有的特征多项式定义为 $\det(A-\lambda I)$ ,这两种定义本质没有区别,但前一个可以保证得到的是首 $1$ 多项式。
为了方便,矩阵里的元素均在 $\mathbb F_{998244353}$ 中,即所有运算对 $998244353$ 取模。
Input
第一行一个整数 $n$ 。
接下来 $n$ 行每行 $n$ 个整数,第 $i$ 行第 $j$ 个数表示 $A_{ij}$ 的值。
Output
输出 $n+1$ 个整数,用空格隔开,表示特征多项式的 $x^0,\cdots,x^n$ 项的系数。注意上述定义保证了最后一个数是 $1$ 。
Sample Input 1
2
1 0
0 2
Sample Output 1
2 998244350 1
Explanation
所求答案为 $\det\left(\begin{matrix}\lambda-1 & 0\\0 & \lambda-2\end{matrix}\right)=\lambda^2-3\lambda+2$
Sample Input 2
3
1 1 4
5 1 4
19 19 810
Sample Output 2
2936 1464 998243541 1
Constraints
$0\le A_{ij}< 998244353$
子任务 $1$ ( $\texttt{1pts}$ ) : $1\le n\le 5$
子任务 $2$ ( $\texttt{38pts}$ ) : $1\le n\le 50$
子任务 $3$ ( $\texttt{61pts}$ ) : $1\le n\le 500$