This problem might be well-known in some countries, but how do other countries learn about such problems if nobody poses them?
You are given a non-decreasing positive integer sequence A=(A_1,A_2,…,A_N) of length N. For each k=0,1,2,…,N, count the number of non-decreasing non-negative integer sequences x=(x_1,x_2,…,x_N) of length N that satisfy following conditions, modulo 998244353:
The first line contains an integer N (1≤N≤250000).
The second line contains N integers A_1,A_2,…,A_N (1≤A_1≤A_2≤⋯≤A_N≤250000).
For each k=0,1,2,…,N, print the answer.