#include <bits/stdc++.h>
using namespace std;
int main() {
  long long k, n;
  cin >> n >> k;
  long long d, f = 0, f2 = 0;
  d = n / k;
  long long a[n + 1];
  if (d < 3) {
    cout << "-1" << endl;
  } else {
    while (n--) cout << ((n / k) % 2 + n) % k + 1 << " ";
    cout << endl;
  }
  return 0;
}
