#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int INF = 1e9;
const long long INF64 = 9e18;
const long double EPS = 1e-9;
const long double PI = 3.14159265358979310000;
const long long MD = 1248742437;
const long long T = 378531;
const int N = 1200001;
const int M = 501;
int n, k, a[N];
int main() {
  cin >> n >> k;
  if (n / k < 3) {
    cout << -1;
    return 0;
  }
  int j = 1;
  for (int i = 1; i <= k * 2; i++) {
    a[i] = j;
    j++;
    if (j > k) j = 1;
  }
  j = k;
  for (int i = k * 2 + 1; i <= n; i++) {
    a[i] = j;
    j--;
    if (j == 0) j = k;
  }
  swap(a[k / 2], a[k / 2 + 1]);
  for (int i = 1; i <= n; i++) printf("%d ", a[i]);
  return 0;
}
