#include <bits/stdc++.h>
using namespace std;
long long int n, k;
int main() {
  std::cin >> n >> k;
  std::vector<int> ans(n, 1);
  if (k * 3 > n || k == 1) {
    std::cout << -1 << std::endl;
    return 0;
  }
  int l = 0, r = 2 * k;
  for (int i = 1; i <= k; i++) {
    ans[l] = ans[l + 1] = ans[r] = i;
    l += 2;
    r++;
  }
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  cout << "\n";
  return 0;
}
