#include <bits/stdc++.h>
using namespace std;
int n, k;
int main() {
  scanf("%d %d", &n, &k);
  if (k == 1 || 3 * k > n)
    printf("-1\n");
  else {
    for (int i = 2; i <= k; i++) printf("%d ", i);
    printf("1");
    int j = 1;
    for (int i = k + 1; i <= n; i++) {
      printf(" %d", j);
      j++;
      if (j > k) j = 1;
    }
  }
  return 0;
}
