#include using namespace std; template struct BIT { private: int n, p; std::vector d; public: BIT(int n) : n(n), d(n + 1) { p = 1; while(p < n) p *= 2; } void add(int i, T x = 1) { for(i++; i <= n; i += i & -i) d[i] += x; } //return sum[0,i) T sum(int i) { T res = 0; for(; i; i -= i & -i) res += d[i]; return res; } //return sum[l,r) T sum(int l, int r) { return sum(r) - sum(l); } //return min(x) which satisfies (v0 + v1 + ... + vx >= w) int lower_bound(T w) { if(w <= 0) return 0; T x = 0; for(int i = p; i; i /= 2) { if(i + x <= n && d[i + x] < w) { w -= d[i + x]; x += i; } } return x; } }; int main() { int n; long long m, k; cin >> n >> m >> k; BIT BT(n); for(int i = 0; i < n; i++) BT.add(i, 1); vector a(n), res(n); iota(a.begin(), a.end(), 0ll); a[n - 1] += m - (long long)n * (n - 1) / 2; for(int i = 0; i < n; i++) { long long d = min(k, (long long)n - 1 - i); k -= d; int pl = BT.lower_bound(++d); BT.add(pl, -1); res[pl] = a[i]; } for(const auto &v : res) cout << v << '\n'; return 0; }