#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:167772160")
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  if (3 * k > n) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 2; i <= k; i++) cout << i << " ";
  cout << 1 << " ";
  for (int i = 1; i <= k; i++) cout << k - i + 1 << " ";
  for (int i = 2 * k + 1; i <= n; i++)
    if (i % k)
      cout << i % k << " ";
    else
      cout << k << " ";
  return 0;
}
