#include <bits/stdc++.h>
using namespace std;
int T1[] = {1, 1, 2, 1, 2, 2};
int T2[] = {1, 1, 2, 1, 3, 2, 2, 3, 3};
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  if (n < 3 * k) {
    printf("-1\n");
    return 0;
  }
  vector<int> V;
  int v = 0;
  for (; k != 3 && k != 0; k -= 2, v += 2)
    for (int i = 0; i < 6; ++i) V.push_back(T1[i] + v);
  if (k == 3)
    for (int i = 0; i < 9; ++i) V.push_back(T2[i] + v);
  while (V.size() < n) V.push_back(1);
  for (int i = 0; i < (int)V.size() - 1; ++i) printf("%d ", V[i]);
  printf("%d\n", V.back());
  return 0;
}
