#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #pragma warning(disable:4996) //#define ATCODER #ifdef ATCODER #include #endif typedef long long ll; typedef unsigned long long ull; #define LINF 9223300000000000000 #define LINF2 1223300000000000000 #define LINF3 1000000000000 #define INF 2140000000 const long long MOD = 1000000007; //const long long MOD = 998244353; using namespace std; #ifdef ATCODER using namespace atcoder; #endif ll dp[2][1000005]; void solve() { int n, K, L; scanf("%d%d%d", &n, &K, &L); int pre = 0, cur = 1; dp[pre][0] = 1; for (int i = 0; i < K; i++) { for (int j = 0; j < n; j++) { dp[cur][j] = 0; } for (int j = 0; j < n; j++) { int i0 = (j + 1) % n, i1 = (j + L + 1) % n; if (i0 <= i1) { dp[cur][i0] = (dp[cur][i0] + dp[pre][j]) % MOD; dp[cur][i1] = (dp[cur][i1] - dp[pre][j] +MOD) % MOD; } else { dp[cur][0] = (dp[cur][0] + dp[pre][j]) % MOD; dp[cur][i1] = (dp[cur][i1] - dp[pre][j] +MOD) % MOD; dp[cur][i0] = (dp[cur][i0] + dp[pre][j]) % MOD; } } for (int j = 1; j < n; j++) { dp[cur][j] = (dp[cur][j] + dp[cur][j - 1]) % MOD; } swap(pre, cur); } for (int i = 0; i < n; i++) { printf("%lld\n", dp[pre][i]); } return; } int main() { #if 1 solve(); #else int T, t; scanf("%d", &T); for (t = 0; t < T; t++) { //printf("Case #%d: ", t + 1); solve(); } #endif return 0; }