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