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