#include <bits/stdc++.h>
using namespace std;
struct __s {
  __s() {
    srand(time(NULL));
    if (1) {
      ios_base::Init i;
      cin.sync_with_stdio(0);
      cin.tie(0);
    }
  }
  ~__s() {
    if (!1)
      fprintf(stderr, "Execution time: %.3lf s.\n",
              (double)clock() / CLOCKS_PER_SEC);
    long long n;
    cin >> n;
  }
} __S;
int main(void) {
  long long n, k;
  cin >> n >> k;
  if (n / 3 < k) {
    cout << -1 << '\n';
    return 0;
  }
  vector<long long> a;
  long long i = 0;
  a.push_back(k);
  a.push_back(1);
  i += 2;
  for (long long j = 2; j < k; j++) {
    a.push_back(j);
    a.push_back(j);
    i += 2;
  }
  a.push_back(1);
  a.push_back(k);
  i += 2;
  while (n - a.size() != k) {
    a.push_back(k);
    i++;
  }
  for (long long j = k; j >= 1; j--) {
    a.push_back(j);
  }
  for (long long i = 0; i < (long long)(a.size()); i++) {
    printf("%d ", a[i]);
  }
  printf("\n");
  return 0;
}
