#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  ;
  int n, k;
  cin >> n >> k;
  if ((n / k) <= 2) {
    cout << "-1";
    return 0;
  }
  for (int i = 1; i <= k; i++) cout << i << " " << i << " ";
  for (int i = 1; i <= k; i++) cout << i << " ";
  for (int i = 1; i <= n - 3 * k; i++) cout << "1 ";
}
