#include <bits/stdc++.h>
using namespace std;
long long int a[1000005];
int main() {
  long long int i, j, k, l, n, m;
  cin >> n >> m;
  if (n / m < 3) {
    cout << -1;
    return 0;
  }
  j = 1;
  long long int f = 0;
  long long int x, y;
  x = 1, y = n - 1;
  while (y - x >= 4 && j < m) {
    a[x] = a[x + 1] = a[y] = j;
    j++;
    x += 2;
    y--;
  }
  while (x <= y) {
    a[x] = j;
    x++;
  }
  a[n] = j;
  for (i = 1; i <= n; i++) cout << a[i] << " ";
}
