#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1e9 + 10;
const ll INFL = 4e18;

int main() {
    int N, K;
    cin >> N >> K;

    if (N % K == 0) {
        int b = N / K;
        int c = N - b;
        while (b--) cout << 1 << ' ';
        while (c--) cout << 2 << ' ';
        cout << endl;
    } else {
        cout << -1 << endl;
    }
}