#include #include using namespace std; int main(){ int N, D, K; cin >> N >> D >> K; vector>> dp(N + 1, vector>(K + 1, vector(D + 1, false))); dp[0][0][0] = true; for (int i = 0; i < N; i++){ dp[i + 1] = dp[i]; for (int j = 0; j < K; j++){ for (int k = 0; k < D; k++){ if (dp[i][j][k] && k + N - i <= D){ dp[i + 1][j + 1][k + N - i] = true; } } } } if (!dp[N][K][D]){ cout << -1 << endl; } else { vector ans; int cnt = K; int total = D; for (int i = N - 1; i >= 0; i--){ int c = N - i; if (total >= c){ if (dp[i][cnt - 1][total - c]){ ans.push_back(c); cnt--; total -= c; } } } for (int i = 0; i < K; i++){ cout << ans[i]; if (i < K - 1){ cout << ' '; } } cout << endl; } }