#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  if (n < 3 * k) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < k; i++)
    for (int j = 0; j < 2; j++) cout << i + 1 << " ";
  int cur = 2 * k;
  for (int i = 0; i < k; i++) {
    if (cur != n - 1)
      cout << i + 1 << " ", cur++;
    else
      cout << i + 1 << endl;
  }
  for (int i = 3 * k; i < n; i++)
    if (i != n - 1)
      cout << 1 << " ";
    else
      cout << 1 << endl;
}
