#include <bits/stdc++.h>
using namespace std;
long long int dir[4][2] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
void solve() {
  int n, k;
  cin >> n >> k;
  vector<int> v(n + 1);
  if (n < k * 3)
    cout << "-1";
  else {
    int rev = 0, num = 1;
    bool f = true;
    for (int i = 1; i <= n; i++) {
      if (f) {
        v[i] = num;
        v[i + 1] = num;
        num++;
        i++;
        if (num > k) {
          num = 1;
          f = false;
        }
      } else {
        v[i] = num;
        num++;
        if (num > k) {
          num = 1;
          f = false;
        }
      }
    }
    for (int i = 1; i <= n; i++) {
      cout << v[i] << " ";
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(NULL);
  cin.tie(NULL);
  ;
  long long int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
