#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
template <class T>
T ABS(const T &x) {
  return x > 0 ? x : -x;
}
long long int gcd(long long int n1, long long int n2) {
  return n2 == 0 ? ABS(n1) : gcd(n2, n1 % n2);
}
long long int lcm(long long int n1, long long int n2) {
  return n1 == 0 && n2 == 0 ? 0 : ABS(n1 * n2) / gcd(n1, n2);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, k;
  cin >> n >> k;
  if (n < 3 * k || k == 1) {
    cout << -1 << "\n";
    return 0;
  }
  int pos[n + 1], curr = 1;
  for (int i = 1; i < (k + 1); ++i) {
    pos[curr++] = i;
    pos[curr++] = i;
  }
  int in = 1, up = 0;
  while (curr <= n) {
    if (in == k + 1) {
      up = 1 - up;
      --in;
      continue;
    }
    if (in == 0) {
      up = 1 - up;
      ++in;
    }
    if (up) {
      pos[curr] = in;
      --in;
    } else {
      pos[curr] = in;
      ++in;
    }
    ++curr;
  }
  for (int i = 1; i < (n + 1); ++i) {
    cout << pos[i] << " ";
  }
  return 0;
}
