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

int main(){
	int N,K; cin >> N >> K;
	if(N % K != 0)cout << -1 << endl;
	else{
		for(int i = 0; i < N; i++){
			if(i < N/K)cout << 1 << " ";
			else cout << 2 << " ";
		}
		cout << endl;
	}
	return 0;
}