#include <bits/stdc++.h>
using namespace std;
int main() {
  int q, w, e, r, t;
  cin >> q >> w;
  if (q / w < 3)
    cout << -1;
  else {
    cout << "1 1 2 1 ";
    for (e = 2; e < w; e++) cout << e + 1 << " " << e << " " << e << " ";
    for (e = 0; e < q - (w - 1) * 3 - 1; e++) cout << w << " ";
  }
  return 0;
}
