#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  if (k * 3 > n) {
    cout << -1 << endl;
    return 0;
  }
  int cc = 1;
  bool up = true;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    v.push_back(cc);
    if (up) {
      cc++;
      if (cc == k + 1) {
        cc = k;
        up = false;
      }
    } else {
      cc--;
      if (cc == 0) {
        cc = 1;
        up = true;
      }
    }
  }
  swap(v[0], v[k / 2]);
  for (int i = 0; i < n; i++) {
    printf("%d ", v[i]);
  }
  return 0;
}
