#include <bits/stdc++.h>
using namespace std;
class classcomp {
 public:
  bool operator()(const int& l, const int& r) const { return l < r; }
};
int main() {
  int n, k;
  cin >> n >> k;
  double r = (double)n / (double)k;
  if (r < 3) {
    cout << "-1";
  } else {
    int q = n % k;
    int p = n / k;
    int c = 1, count = 0;
    for (int i = 1; i <= k; ++i) {
      cout << i << " ";
      count++;
    }
    if (count <= n)
      for (int i = 1; i <= k; ++i) {
        for (int j = 1; j < n / k; ++j) {
          if (count <= n) cout << i << " ";
          count++;
        }
      }
    if (count <= n)
      for (int i = count; i < n; ++i) cout << k << " ";
  }
}
