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