Village Planning

아직 제출이 없습니다시간 제한3초메모리 제한1024 MB

문제

As the mayor of the RUN town, you are planning to build a new village. The village consists of houses and roads connecting two different houses. Roads are organized in a way such that no two pairs of roads connect the same pair of houses. In other words, the village can be treated as a simple graph where each house corresponds to vertices, and each road corresponds to edges. Note that the village may be disconnected.

You want your village to be as simple as possible. Therefore, for any distinct houses ii and jj, there should be at most KK simple paths from house ii to house jj.

Let NN be the number of houses. The score of the village is _1i\<jNA_f(i,j)\prod\_{1\le i\<j\le N}A\_{f(i,j)}, where f(i,j)f(i,j) is the number of simple paths from house ii to house jj.

While the number of houses is not determined yet, you know that it will be an integer between 22 and MM. You should calculate the sum of the scores for all possible villages with NN houses for each NN from 22 to MM.

Since the answers can be large, output them modulo 998,244,353998\\, 244\\, 353.

입력

The first line contains an two space-separated integers MM and KK.

The second line contains K+1K+1 space-separated integers A_0,,A_KA\_0,\dots ,A\_K.

출력

For each NN from 22 to MM, output the sum of the scores for all possible villages with NN houses, modulo 998,244,353998\\, 244\\, 353. The answers should be separated by a space. 998,244,353=119×223+1998\\, 244\\, 353=119\times 2^{23}+1 is a prime number.

제한

  • 2M100,0002\leq M\leq 100\\, 000
  • 0K30\leq K\leq 3
  • 1A_i<998,244,3531\leq A\_i<998\\, 244\\, 353 (0iK)(0\le i\le K)