x, y, z, k = gets.chop.split.map(&:to_i)
as = gets.chop.split.map(&:to_i).sort! { |x, y| y <=> x }
bs = gets.chop.split.map(&:to_i).sort! { |x, y| y <=> x }
cs = gets.chop.split.map(&:to_i).sort! { |x, y| y <=> x }

1000.times do
  as << -1
  bs << -1
  cs << -1
end

sums = []
a_i = 0
b_i = 0
c_i = 0
new_as = []
new_bs = []
new_cs = []
loop do
  break if a_i * b_i * c_i >= [x * y * z, 10000].min
  abc_max = [as[a_i], bs[b_i], cs[c_i]].max
  if abc_max == as[a_i]
    new_as << abc_max
    a_i += 1
  elsif abc_max == bs[b_i]
    new_bs << abc_max
    b_i += 1
  elsif abc_max == cs[c_i]
    new_cs << abc_max
    c_i += 1
  end
end
new_as.each do |a|
  new_bs.each do |b|
    new_cs.each do |c|
      sums << a + b + c
    end
  end
end

sums.sort! { |x, y| y <=> x }

k.times do |i|
  puts sums[i]
end
