#include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; ll m, k; cin >> m >> k; vector r(n, -1); for (int i = 0; i < n; i++) { ll t = n - 1 - i; if (k <= t) { for (int j = 0; j < i; j++) { r[n - i + j] = j; } r[k] = i; int x = i + 1; for (int j = 0; j < n - i; j++) { if (r[j] == i) continue; r[j] = x++; } break; } k -= t; } for (int i = 0; i < n; i++) { if (r[i] == n - 1) r[i] += m - (ll)n * (n - 1) / 2; cout << r[i] << '\n'; } return 0; }