AT_abc439_g [ABC439G] Sugoroku 6

Description

> Happy New Year! When it comes to indoor play on New Year's, it's sugoroku! There is a sugoroku board consisting of $ N+1 $ squares: squares $ 0 $ , square $ 1 $ , $ \dots $ , square $ N $ . There is an $ M $ -sided die (dice) that produces positive integers $ A_1, A_2, \dots, A_M $ with equal probability. Here, $ A_1, A_2, \dots, A_M $ are distinct. Person $ 1 $ , person $ 2 $ , $ \dots $ , person $ L $ will play a game using this board. The game proceeds as follows: - Initially, place $ L $ pieces, piece $ 1 $ , piece $ 2 $ , $ \dots $ , piece $ L $ , on square $ 0 $ . - Turns come around in numerical order starting with person $ 1 $ . Strictly speaking, after person $ i $ 's turn, the turn goes to person $ (i \bmod L) + 1 $ . Each person performs the following operation on their turn: - Let $ i $ be the number of the person whose turn it is. Roll the die. Let $ x $ be the square where piece $ i $ is located and $ y $ be the integer that came up on the die, and move piece $ i $ to square $ \min(N, x+y) $ . - The first person to place their numbered piece on square $ N $ wins, and the other people lose. For $ i =1,2,\dots,L $ , find the probability, modulo $ 998244353 $ , that person $ i $ wins. What is probability $ \text{mod }998244353 $ ? It can be proved that the probability to be found is always a rational number. Also, under the constraints of this problem, when the value is expressed as $ \frac{P}{Q} $ using two coprime integers $ P $ and $ Q $ , it can be proved that there exists exactly one integer $ R $ that satisfies $ R \times Q \equiv P\pmod{998244353} $ and $ 0 \leq R \lt 998244353 $ . Find this $ R $ .

Input Format

The input is given from Standard Input in the following format: > $ N $ $ M $ $ L $ $ A_1 $ $ A_2 $ $ \dots $ $ A_M $

Output Format

Output $ L $ lines. The $ i $ -th line should contain the probability that person $ i $ wins the game, computed modulo $ 998244353 $ .

Explanation/Hint

### Sample Explanation 1 Person $ 1 $ wins with the probability $ \frac{5}{8} $ , person $ 2 $ wins with the probability $ \frac{1}{4} $ , and person $ 3 $ wins with the probability $ \frac{1}{8} $ . ### Constraints - $ 1 \leq N \leq 2.5 \times 10^5 $ - $ 1 \leq M \leq N $ - $ 2 \leq L \leq 2.5 \times 10^5 $ - $ 1 \leq A_1 \lt A_2 \lt \dots \lt A_M \leq N $ - All input values are integers.