n,k=gets.split.map &:to_i;puts ([1]*k+[1,3,2,4]*9999).first(n)*" "