#include <bits/stdc++.h>
int dx[] = {0, -1, 0, 1, -1, 1, -1, 1};
int dy[] = {-1, 0, 1, 0, 1, -1, -1, 1};
const int N = 2e6 + 5, oo = 1e9;
const long long mod = 1e9 + 7, MOD2 = 1e9 + 9, p1 = 1000003, p2 = 1000033;
const double pi = acos(-1);
using namespace std;
bool done[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  if (k * 3 > n) return cout << -1, 0;
  vector<int> a, b;
  for (int i = 1; i <= k; i++) a.push_back(i);
  for (int i = 2; i <= k; i++) b.push_back(i);
  b.push_back(1);
  for (int i = 0; i < n; i++) {
    if ((i / k) % 2)
      cout << a[i % k] << ' ';
    else
      cout << b[i % k] << ' ';
  }
  return 0;
}
