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