#include <bits/stdc++.h>
using namespace std;
int a[1234567];
int main() {
  int n, k;
  cin >> n >> k;
  if (3 * k > n) {
    cout << -1;
    return 0;
  }
  int t = 1;
  for (int i = 0; i < 2 * k; i += 2) {
    a[i] = a[i + 1] = t++;
  }
  t = 1;
  for (int i = 2 * k; i < 3 * k; i++) {
    a[i] = t++;
  }
  for (int i = 3 * k; i < n; i++) {
    a[i] = 1;
  }
  for (int i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  return 0;
}
