#include using namespace std; int N, K; int main() { cin >> N >> K; vector ans; if (N % K != 0) { cout << -1 << endl; return 0; } for (int i = 1; i <= N / K; i++) ans.push_back(1); for (int i = 1; i <= N - (N / K); i++) ans.push_back(2); for (int i = 0; i < N; i++) { cout << ans[i]; if (ans.size() == N - 1) cout << endl; else cout << ' '; } return 0; }