#include <bits/stdc++.h>
using namespace std;
typedef priority_queue<pair<int, int>, vector<pair<int, int>>,
                       greater<pair<int, int>>>
    rpqpi;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  if (k * 3 > n)
    cout << -1 << '\n';
  else {
    for (int i = 0; i < k; ++i) {
      cout << i + 1 << " ";
    }
    for (int i = 0; i < k; ++i) {
      cout << i + 1 << " " << i + 1 << " ";
    }
    for (int i = 3 * k; i < n; ++i) {
      cout << 1 << " ";
    }
    cout << '\n';
  }
  return 0;
}
