ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

2212. Prefossum

Time limit: 2.0 second
Memory limit: 256 MB
When talking about marsupial mammals, the first thing that comes to mind is kangaroos, followed by opossums, bandicoots, and others. Recently, Vadim discovered a new species of marsupials and named it “Prefossums.” These are very remarkable creatures; their size is comparable to young moles, with a yellow-orange coloration and white spots, a long and fluffy tail, but what impresses the most is their mathematical abilities.
If a prefossum is left with an array a of N numbers, then in just one day, the little creature will transform it into a prefix sum array p of the original array a. This means that for any position numbered i, the equation pi = ∑ij=1 aj will hold. If the resulting array is not taken away from the prefossum, it will continue its actions, but with a new array.
“The world must know about this animal,” thought Vadim and set out to write a letter to IUBS, leaving an interesting array v with one prefossum. However, the process turned out to be time-consuming; it took Vadim Q days, and he just now remembered about the array he left behind. Unfortunately, the work is not yet finished, and it is essential to include the current array in the letter. Help Vadim find the values of this array.

Input

The first line contains two integers N and Q — the number of elements in the original interesting array and the number of days the array has been with the prefossum (2 ≤ N ≤ 105, 1 ≤ Q ≤ 107).
The second line contains N integers vi — the values of the original array (1 ≤ vi ≤ 108).

Output

Output N integers — the values of the array after Q days with the prefossum, modulo 998 244 353.

Sample

inputoutput
3 2
1 2 3
1 4 10

Notes

On the first day, the prefossum will transform the original array into the array [1, 3, 6].
Problem Author: Yackov Malin
Problem Source: University academic school olympiad in informatics 2024