#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, k;
  cin >> n >> k;
  float x = float(n) / k;
  int ans[n];
  if (x < 3) {
    cout << -1;
  } else {
    int a[k];
    for (int i = 0; i < k; i++) {
      a[i] = i + 1;
    }
    copy(a, a + k, ans);
    for (int i = 0; i < k; i++) {
      a[i] = k - i;
    }
    copy(a, a + k, ans + k);
    for (int i = 0; i < k; i++) {
      a[i] = i + 1;
    }
    copy(a, a + k, ans + 2 * k);
    if (x == 3 && k % 2 == 1) {
      for (int i = 0; i < 3 * k; i++) {
        if (ans[i] == 1) {
          ans[i] = (k / 2) + 1;
        } else if (ans[i] == (k / 2) + 1) {
          ans[i] = 1;
        }
      }
      ans[0] = 1;
      ans[k / 2] = k / 2 + 1;
    }
    copy(ans, ans + 3 * k, ostream_iterator<int>(cout, " "));
    for (int i = 3 * k; i < n; i++) {
      cout << (k + 1) / 2 << " ";
    }
  }
  return 0;
}
