n, k = map(int, input().split()) if n % k: print(-1) exit() c = n // k x = [1] * c + [2] * (n - c) print(*x)