#include <bits/stdc++.h>
#include "books.h"
#define int long long
const int inf = 1e18 + 10;
using namespace std;
//
// --- Sample implementation for the task books ---
//
// To compile this program with the sample grader, place:
// books.h books.cpp grader.cpp
// in a single folder and run:
// g++ books.cpp grader.cpp
// in this folder.
//
map<int, int> resp;
void solve(signed n, signed k, long long A, signed s) {
int l = 0, r = n - k;
int lst_sum = 0;
while (l < r) {
int m = (l + r) / 2;
int sum = 0;
for (int j = m; j <= m + k - 1; j++) {
sum += (resp.count(j) ? resp[j] : skim(j + 1));
}
if (sum >= A) r = m;
else l = m + 1;
}
vector<signed> ans;
for (int i = l; i <= l + k - 1; i++) {
lst_sum += (resp.count(i) ? resp[i] : skim(i + 1));
ans.push_back(i + 1);
}
if (lst_sum < A || lst_sum > 2 * A) impossible();
answer(ans);
}