#pragma GCC optimize("Ofast") #include using namespace std; typedef long long int ll; typedef unsigned long long int ull; mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()); ll myRand(ll B) { return (ull)rng() % B; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n, k; cin >> n >> k; if (n % k == 0) { if (n == 1 and k != 1) { cout << -1 << endl; return 0; } for (int i = 0; i < n; ++i) { if (i < n / k) { cout << 1 << " "; } else { cout << 2 << " "; } } cout << endl; } else { cout << -1 << endl; } }