100 atcoder#ABC132D. [ABC132D] Blue and Red Balls

[ABC132D] Blue and Red Balls

Score : 400400 points

Problem Statement

There are KK blue balls and NKN-K red balls. The balls of the same color cannot be distinguished. Snuke and Takahashi are playing with these balls.

First, Snuke will arrange the NN balls in a row from left to right.

Then, Takahashi will collect only the KK blue balls. In one move, he can collect any number of consecutive blue balls. He will collect all the blue balls in the fewest moves possible.

How many ways are there for Snuke to arrange the NN balls in a row so that Takahashi will need exactly ii moves to collect all the blue balls? Compute this number modulo 109+710^9+7 for each ii such that 1iK1 \leq i \leq K.

Constraints

  • 1KN20001 \leq K \leq N \leq 2000

Input

Input is given from Standard Input in the following format:

NN KK

Output

Print KK lines. The ii-th line (1iK1 \leq i \leq K) should contain the number of ways to arrange the NN balls so that Takahashi will need exactly ii moves to collect all the blue balls, modulo 109+710^9+7.

5 3
3
6
1

There are three ways to arrange the balls so that Takahashi will need exactly one move: (B, B, B, R, R), (R, B, B, B, R), and (R, R, B, B, B). (R and B stands for red and blue, respectively).

There are six ways to arrange the balls so that Takahashi will need exactly two moves: (B, B, R, B, R), (B, B, R, R, B), (R, B, B, R, B), (R, B, R, B, B), (B, R, B, B, R), and (B, R, R, B, B).

There is one way to arrange the balls so that Takahashi will need exactly three moves: (B, R, B, R, B).

2000 3
1998
3990006
327341989

Be sure to print the numbers of arrangements modulo 109+710^9+7.