#include <bits/stdc++.h>
using namespace std;
int inf = 1e9;
const int N = 1e6 + 10;
int ans[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, k, j = 1, x;
  cin >> n >> k;
  if (n / k <= 2) return cout << "-1", 0;
  x = n - 1;
  ans[n] = k;
  for (int i = 1; i < k; i++) {
    ans[j++] = i;
    ans[j++] = i;
    ans[x--] = i;
  }
  for (; j <= x; j++) ans[j] = k;
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
}
