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