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