#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int k;
  cin >> n >> k;
  int *ns = new int[n];
  if (n / k < 3) {
    cout << -1 << endl;
    return 0;
  }
  int d = 1;
  int f = 0;
  int g = 0;
  while (f < n) {
    g += d;
    if (g == k + 1) {
      d = -d;
      g = k;
    }
    if (g == 0) {
      d = -d;
      g = 1;
    }
    ns[f] = g;
    f++;
  }
  if (k % 2 == 1) {
    int t = k / 2;
    int temp = ns[t];
    ns[t] = ns[t + 1];
    ns[t + 1] = temp;
  }
  for (int i = 0; i < n; i++) {
    cout << ns[i] << " ";
  }
  return 0;
}
