#include <bits/stdc++.h>
int main() {
  long n, k, i;
  std::cin >> n >> k;
  if (3 * k > n) {
    std::cout << -1 << std::endl;
  } else {
    long pos = 1, kk, step = 0, lpos = 2;
    while (true) {
      if (pos > k) break;
      if (!step) {
        kk = lpos;
        step = k;
        lpos++;
        if (lpos > k) lpos = 1;
      }
      if (kk > k) kk = 1;
      std::cout << kk << " ";
      pos++;
      kk++;
      step--;
    }
    kk = 1;
    while (pos <= n) {
      if (kk > k) kk = 1;
      std::cout << kk << " ";
      pos++;
      kk++;
    }
    std::cout << std::endl;
  }
  return 0;
}
