#include <bits/stdc++.h>
using namespace std;
const int N = 1000001;
int a[N];
int main() {
  srand(time(NULL));
  int n, k;
  cin >> n >> k;
  if (3 * k > n) {
    cout << -1, exit(0);
  }
  for (int i = 1; i <= k; i++) {
    a[i * 2] = i;
    a[i * 2 - 1] = i;
  }
  int cnt = 0;
  for (int j = k * 2 + 1; j <= k * 3; j++) {
    cnt++;
    a[j] = cnt;
  }
  for (int j = k * 3 + 1; j <= n; j++) {
    a[j] = 1;
  }
  for (int i = 1; i <= n; i++) cout << a[i] << " ";
  return 0;
}
