- Time limit: 1.00 s
- Memory limit: 128 MB
Given integers , calculate the product for every . The results will be very large, so calculate them modulo (1000000007
).
Input
The first line contains a single integer . The second line contains integers .
Output
Output integers separated by spaces representing the products modulo .
Constraints
Examples
Input:
5 5 2 3 2 6
Output:
5 10 30 60 360
Input:
4 100000 100000 1000000000 2
Output:
100000 999999937 490 980
Note
For an explanation of the modulo operation, see this Wikipedia article.