#include <bits/stdc++.h>
using namespace std;
const int maxn = 10000 * 100 + 100;
int a[maxn], n, k;
int main() {
  cin >> n >> k;
  if (k > n / 3) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) a[i] = 1;
  for (int i = 0; i < k; i++) a[i] = i + 1;
  for (int i = n - 1, j = k; j >= 1; j--, i -= 2) {
    a[i] = j;
    a[i - 1] = j;
  }
  for (int i = 0; i < n; i++) {
    if (a[i] > k) a[i] = 1;
    cout << a[i] << " ";
  }
  return 0;
}
