#include <bits/stdc++.h>
using namespace std;
void solve(istream &in, ostream &out) {
  int n, k;
  in >> n >> k;
  if (k * 3 > n) {
    out << -1 << endl;
    return;
  }
  for (int i = 0; i < k; ++i) out << (i == 0 ? "" : " ") << i + 1;
  for (int i = 0; i < k * 2; ++i) out << ' ' << i / 2 + 1;
  for (int i = k * 3; i < n; ++i) out << ' ' << 1;
  out << endl;
}
int main() { solve(cin, cout); }
