#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; int N, D, K; bool visited[101][1010][11]; bool g_found; void dfs(int i, int d, int k, vector &path) { if (g_found) return; if (i > N) return; if (visited[i][d][k]) return; visited[i][d][k] = true; if (k == K) { if (d == D) { for (int j = 0; j < k; ++j) { cout << path[j]; if (j + 1 < k) cout << " "; } cout << endl; g_found = true; return; } else { return; } } for (int v = i + 1; v <= N; ++v) { path.push_back(v); dfs(v, d + v, k + 1, path); path.pop_back(); } } int main() { cin >> N >> D >> K; memset(visited, false, sizeof(visited)); g_found = false; vector path; dfs(0, 0, 0, path); if (not g_found) { cout << -1 << endl; } return 0; }