Consider a tree whose vertices are numbered from to . The tree is regarded as a rooted tree with vertex as the root.
The number of children of a vertex is the number of vertices directly below it when the tree is viewed in the direction away from the root vertex .
You are given positive integers and pairwise distinct integers . For every , count the number of trees on vertices such that the number of children of every vertex is one of .
Since the answers can be very large, print each answer modulo .
Input
The input is given in the following format.
Output
Print integers separated by spaces on one line.
The -th integer must be the answer for , modulo .
Constraints
- .
- .
- .
- ().
- ().
Subtasks
Samples
예제 1
입력
5 3
0 1 2
출력
1 1 3 15 108
예제 2
입력
7 2
0 2
출력
1 0 1 0 12 0 450