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