#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> res(n, 0);
  if (n < k || n / k < 3) {
    cout << "-1";
    return 0;
  }
  int count = n / k;
  int i = 0;
  for (int j = 0; j < k; ++j) {
    for (int l = 0; l < count - 1; ++l) {
      res[i] = j + 1;
      ++i;
    }
  }
  for (int j = 0; j < k; ++j) {
    res[i] = j + 1;
    i++;
  }
  for (int j = count * k; j < n; ++j) {
    res[i] = 1;
    i++;
  }
  for (int i = 0; i < res.size(); ++i) {
    printf("%d ", res[i]);
  }
  return 0;
}
