_n1, _n2, _n3, n = gets.strip.split.map(&:to_i)
d = []
3.times { d << gets.strip.split.map(&:to_i) }

s = []
d[0].each do |i|
  d[1].each do |j|
    d[2].each do |k|
      s << (i + j + k)
    end
  end
end
s.sort!

(n + 1).times do |i|
  puts s[-i]
end
