#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e+9 + 9;
const long double EPS = 1e-9;
const long double PI = 3.1415926535897932384626433832795;
const int N = 1000500;
int n, k, ans[N];
int main() {
  scanf("%d%d", &n, &k);
  if (k * 3 > n) {
    printf("-1");
    return 0;
  }
  if (((k)&1)) {
    int d = 2;
    for (int i = 1; i <= k - 1; i += 2) {
      ans[d] = ans[d + 1] = ans[d + 3] = i;
      d += 2;
      ans[d] = ans[d + 2] = ans[d + 3] = i + 1;
      d += 4;
    }
    ans[1] = k;
    for (int i = d; i <= n; ++i) ans[i] = k;
  } else {
    int d = 1;
    for (int i = 1; i <= k; i += 2) {
      ans[d] = ans[d + 1] = ans[d + 3] = i;
      d += 2;
      ans[d] = ans[d + 2] = ans[d + 3] = i + 1;
      d += 4;
    }
    for (int i = d; i <= n; ++i) ans[i] = k;
  }
  for (int i = 1; i <= n; ++i) printf("%d ", ans[i]);
  return 0;
}
