There are consecutive positions in a line, indexed from to from left to right.
- There are \textbf{balls}, initially placed at positions .
- There are \textbf{holes}, located at positions .
You have to perform exactly moves, one for each ball. In a single move:
- Choose any unused ball.
- Push it either left or right.
- The ball will continue moving in that direction until it reaches the first empty hole, where it will fall in and stop.
Note that there are distinct valid sequences of moves (each permutation of the balls, with each ball pushed either left or right), and at the end of every valid sequence exactly one hole will remain empty.
Your task is to compute, for each hole position from to , how many of these sequences leave hole empty at the end.
Since the answers may be large, calculate them modulo a given prime .
Input data
The first and only line of the input consists of two space-separated integers and - the number of balls and the prime modulus, respectively.
Output data
Output a single line containing space-separated integers - the number of different sequences of moves that leave hole (the hole at position for each from to ) empty.
Constraints and clarifications
- .
- .
- is prime.
# | Score | Restrictions |
---|---|---|
0 | 0 | Examples |
1 | 12 | . |
2 | 11 | . |
3 | 26 | . |
4 | 51 | No additional limitations. |
Example 1
stdin
3 1000000007
stdout
15 9 9 15
Example 2
stdin
7 100000007
stdout
135135 72765 59535 55125 55125 59535 72765 135135