n,d=gets.split.map(&:to_i) a=gets.split.map(&:to_i) ls = [0] a.each{|x|ls << ls[-1] + x} for i in 0..n-2 do dif = ls[i+1] - ls[i] if dif < d then ls[i+1] += (d-dif) end end puts ls.join(' ')