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