#include <bits/stdc++.h>
#pragma GCC optimize("Ofast", "unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
const long long mod = 1000000009;
using namespace std;
long long int power(long long int a, long long int n) {
  long long int p = 1;
  while (n > 0) {
    if (n % 2) {
      p = p * a;
    }
    n >>= 1;
    a *= a;
  }
  return p;
}
long long int power_mod(long long int a, long long int n, long long int mod_) {
  long long int p = 1;
  while (n) {
    if (n % 2) {
      p = (p * a) % mod_;
    }
    n /= 2;
    a = (a * a) % mod_;
  }
  return p % mod_;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  long long int n, i, j, k, sum = 0, top = 1, y, x, cnt = 0, flag, ab;
  cin >> n >> k;
  vector<long long int> a(n);
  if (n < 3 * k) {
    cout << "-1\n";
    return 0;
  } else {
    j = 1;
    for (i = 0; i < k - 1; i++) {
      a[i] = j;
      a[i + k - 1] = j;
      a[i + 2 * k - 1] = j;
      j++;
    }
    for (i = 0; i < n; i++) {
      if (a[i] == 0) a[i] = j;
    }
  }
  for (__typeof(a.begin()) i = a.begin(); i != a.end(); i++) cout << *i << ' ';
  ;
  return 0;
}
