#include using namespace std; int n, k; bool solve() { return n % k == 0; } int main() { cin >> n >> k; if (solve()) { int need = n / k; int cnt = 0; for (int i = 1; i <= n; ++i) { if (cnt != need) { cout << 1 << " "; cnt++; } else { cout << 2 << " "; } } } else { cout << -1 << endl; } return 0; }