#include <bits/stdc++.h>
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int N,K; cin >> N >> K;
    if(N%K) cout << "-1" << endl;
    else{
        vector<int> answer;
        for(int i=0; i<N/K; i++) answer.push_back(1);
        while(answer.size() < N) answer.push_back(2);
        for(auto &a : answer) cout << a << " "; cout << endl;
    }
}