#include <bits/stdc++.h>
using namespace std;
int a[1000009];
int main() {
  long long int n, m;
  cin >> n >> m;
  if (m * 3 > n)
    cout << "-1";
  else {
    int c, d, e, f;
    c = n / m;
    d = m;
    c--;
    for (int i = 0; i < m; i++) {
      a[i] = i + 1;
      for (int j = d; j < d + c; j++) {
        a[j] = i + 1;
      }
      d += c;
    }
    for (int i = 0; i < n; i++) {
      if (a[i] != 0) {
        cout << a[i] << " ";
      } else {
        cout << "1 ";
      }
    }
  }
}
