#include using namespace std; #define nl '\n' using ll = long long; const ll infll = (1LL << 62) - 1; const int inf = (1 << 30) - 1; template ostream& operator<<(ostream& os, const pair& p) { os << p.first << " " << p.second; return os; } template istream& operator>>(istream& is, pair& p) { is >> p.first >> p.second; return is; } template ostream& operator<<(ostream& os, const vector& v) { for (int i = 0; i < (int)v.size(); i++) { os << v[i] << (i + 1 != v.size() ? " " : ""); } return os; } template istream& operator>>(istream& is, vector& v) { for (T& in : v) is >> in; return is; } template vector make_v(size_t a) { return vector(a); } template auto make_v(size_t a, Ts... ts) { return vector(ts...))>(a, make_v(ts...)); } template typename enable_if::value == 0>::type fill_v(T& t, const V& v) { t = v; } template typename enable_if::value != 0>::type fill_v(T& t, const V& v) { for (auto& e : t) fill_v(e, v); } template struct FixPoint : F { explicit FixPoint(F&& f) : F(forward(f)) {} template decltype(auto) operator()(Args&&... args) const { return F::operator()(*this, forward(args)...); } }; template inline decltype(auto) MFP(F&& f) { return FixPoint{forward(f)}; } void solve() { int N, K; cin >> N >> K; if (N % K) { cout << -1 << nl; return; } for (int i = 0; i < N / K; ++i) { cout << 1 << " "; } for (int i = N / K; i < N; ++i) { cout << 2 << " "; } cout << nl; } signed main() { std::ios_base::sync_with_stdio(0), std::cin.tie(0); solve(); }