시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB3451688950.568%

문제

Cocoa, the magic sword president of RUN, has obtained a new magic sword named Armageddon. To maximize its power, Cocoa intends to enhance it.

Specifically, the sword's power is determined by its length $x$, enchantment level $y$, and brilliance $z$, according to the formula:

$\frac{x(x+1)}{2}\cdot\frac{y(y+1)}{2}\cdot a^z$

where $x,y,z$ are nonnegative integers. Here, $a$ is a fixed constant determined when Armageddon was forged. Initially, $x,y,z$ are all initialized to 0.

Cocoa can invest her mana to improve the sword. For each $1$ mana spent, she can increase either $x$, $y$, or $z$ by $1$.

For each $k = 1, 2, \cdots, n$, determine the maximum possible power of the sword if Cocoa uses exactly $k$ mana to enhance the sword.

입력

The first line contains three integers $p$, $q$, and $n$ separated by spaces, where $a = p/q$.

출력

Print $n$ values in a single line, separated by spaces.

For the $i$-th value, output $s \times t^{-1} \pmod{10^9+7}$, where $s/t$ is the irreducible fraction representing the maximum possible power after investing exactly $i$ mana.

제한

  • $1 \le p, q, n \le 10^5$

예제 입력 1

1 1 10

예제 출력 1

0 1 3 9 18 36 60 100 150 225

예제 입력 2

2 1 10

예제 출력 2

0 1 3 9 18 36 72 144 288 576

예제 입력 3

100000 1 5

예제 출력 3

0 1 100000 999999937 993000007

노트

There is no magic sword president in RUN.