#include using namespace std; #define lli long long #define endl '\n' #define loop(i, n) for (int i = 0; i < n; i++) #define pool(i, n) for (int i = n - 1; i >= 0; i--) #define rep(i, a, b) for (int i = a; i <= b; i++) #define per(i, b, a) for (int i = b; i >= a; i--) #define all(a) (a).begin(), (a).end() #define vint vector #define vlli vector #define pint pair #define memfill(arr, val) memset(arr, val, sizeof(arr)) void solve() { int n, k; cin >> n >> k; if (n % k != 0) { cout << -1 << endl; return; } int cnt = n / k; vint ans(n); for (int i = 0; i < cnt; i++) ans[i] = 1; for (int i = cnt; i < n; i++) ans[i] = 2; for (auto x : ans) cout << x << " "; cout << endl; } signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t = 1; // cin >> t; while (t--) { solve(); } return 0; }