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