N, K = map(int, input().split()) if N % K != 0: print(-1) else: ans = [1] * (N // K) + [2] * (N - N // K) print(*ans)