#include <bits/stdc++.h>
using namespace std;
int arr[1000001];
int main() {
  int n, k;
  cin >> n >> k;
  int r = k + 1;
  if (k == 1) goto no;
  for (int i = 1; i <= k; i++) {
    arr[i] = i;
    if (r > n) goto no;
    arr[r++] = i;
    if (r > n) goto no;
    arr[r++] = i;
  }
  for (int i = r; i <= n; i++) arr[i] = 1;
  for (int i = 1; i <= n; i++) {
    if (i != 1) cout << " ";
    cout << arr[i];
  }
  cout << endl;
  return 0;
no:
  cout << -1 << endl;
  return 0;
}
