n, t = gets.split.map(&:to_i)
hs = (1..n).map { gets.to_i }
delay = 0
cycle = 0
hs.each do |h|
  cycle = h > cycle ? h : cycle;
  k = (t - delay) / cycle + 1
  k += 1 if (t - delay) % cycle >= h
  puts [k, 1].max
  delay += h
end

