attrs = Array.new
while line = $stdin.gets
    attrs << line.chomp.split.map{|v| v.to_i }
end

X = attrs[0][0]
Y = attrs[0][1]
Z = attrs[0][2]
K = attrs[0][3]
A = attrs[1].sort.reverse
B = attrs[2].sort.reverse
C = attrs[3].sort.reverse

oishisa = Array.new
A.each do |a|
  B.each do |b|
    C.each do |c|
      oishisa << [a,b,c, a + b + c]
    end
  end
end

oishisa.sort{|a, b| b[3] <=> a[3]}
for i in 0..(K - 1) do
  puts oishisa[i][0] + oishisa[i][1] + oishisa[i][2]
end