x,y,z,k = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)
b = gets.split.map(&:to_i)
c = gets.split.map(&:to_i)

a = a.sort.reverse
b = b.sort.reverse
c = c.sort.reverse


all = []
a.each_with_index do |aa, ai|
  b.each_with_index do |bb, bi|
    c.each_with_index do |cc, ci|
      break if (ai+1) * (bi+1) * (ci+1) > k
      all << aa + bb + cc
    end
  end
end

puts all.sort.reverse.take(k)
