#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define llong long long int main() { int n, d, k; cin >> n >> d >> k; int minval = 0; int maxval = 0; rep(i, k) minval += i+1; rep(i, k) maxval += n-i; if(n < k || minval > d || d > maxval) { cout << -1 << "\n"; } else { vector mins(k); deque maxs; rep(i, k) mins[i] = i+1; int result = minval; while(result != d) { result -= mins.back(); mins.pop_back(); int nextval = n - maxs.size(); if(nextval + result < d) { maxs.push_front(nextval); result += nextval; } else { maxs.push_front(d - result); break; } } rep(i, mins.size()) { cout << mins[i]; if(!(i == mins.size()-1 && maxs.empty())) { cout << " "; } } rep(i, maxs.size()) { cout << maxs[i]; if(i != maxs.size()-1) { cout << " "; } } cout << "\n"; } }