#Lutece1743. 01背包计数

01背包计数

Migrated from Lutece 1743 01背包计数

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

你有若干种不同的物品,其中体积为ii的物品有aia_i种,每种物品有11个,求选取物品恰好装满总体积为1n1到n的背包的方案数.

Input

第一行一个整数nn.(1n1051 \leq n \leq 10^5)

接下来一行有nn个整数,分别表示aia_i(1ai1051 \leq a_i \leq 10^5)

Output

输出nn行,分别表示从11nn时的答案,只需输出其在mod 109+7\text{mod } 10^9 +7意义下的值即可

Samples

5
2 3 4 1 5
2
3
10
9
19

Resources

Prepared by xiper