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