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