#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
template <typename T>
inline bool remin(T& c, const T& n) {
  if (n < c) {
    c = n;
    return 1;
  }
  return 0;
}
template <typename T>
inline bool remin2(T& c, const T& n) {
  if (c < 0 || n < c) {
    c = n;
    return 1;
  }
  return 0;
}
template <typename T>
inline bool remax(T& c, const T& n) {
  if (c < n) {
    c = n;
    return 1;
  }
  return 0;
}
template <typename T>
inline void addmod(T& c, const T& n, const T& m) {
  c = (c + n) % m;
}
int _in;
int in() {
  scanf("%d", &_in);
  return _in;
}
const int N = 1e6 + 6;
int main() {
  int n, k, i, th;
  srand(time(NULL));
  scanf("%d%d", &n, &k);
  if (n / k > 2) {
    for (i = 1; i <= k; ++i) {
      printf("%d %d ", i, i);
    }
    for (i = 1; i <= k; ++i) {
      printf("%d ", i);
    }
    for (i = k * 3; i < n; ++i) {
      printf("%d ", rand() % k + 1);
    }
  } else {
    puts("-1");
  }
  return 0;
}
