#include <bits/stdc++.h>
using namespace std;
vector<int> vec;
map<int, int> mp;
queue<int> q;
int a[1002][1002], used[2000002], x[1002], y[1002], us[205002];
int main() {
  int i, j, k, l, m, n, x;
  scanf("%d%d", &n, &k);
  if (k * 3 > n || k == 1) {
    printf("-1");
    return 0;
  }
  for (i = 2; i <= 2 * k; i += 2) {
    used[i] = i / 2;
    used[i - 1] = i / 2;
  }
  for (i = 2 * k + 1; i <= 3 * k; i++) used[i] = i - 2 * k;
  for (i = 3 * k + 1; i <= n; i++) used[i] = k;
  for (i = 1; i <= n; i++) cout << used[i] << " ";
}
