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