#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
long long b[N], a[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, k, s;
  cin >> n >> k >> s;
  for (int i = 1; i <= k; i++) {
    a[i] = s;
  }
  int t = 1;
  for (int i = k + 1; i <= n; i++) {
    if ((i - k) % s == 0) {
      t++;
      while (t == s) t++;
    }
    a[i] = t;
  }
  for (int i = 1; i <= n; i++) {
    cout << a[i] << " ";
  }
  return 0;
}
