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)

sorted_a = A.sort_by { |n| -n }
sorted_b = B.sort_by { |n| -n }
sorted_c = C.sort_by { |n| -n }

candidates = []
sorted_a.each.with_index do |a, i|
  i += 1
  sorted_b.each.with_index do |b, j|
    j += 1
    sorted_c.each.with_index do |c, k|
      k += 1
      break if i * j * k > K
      candidates.push(a + b + c)
    end
  end
end
candidates.sort_by { |n| -n }.take(K).each do |n|
  puts n
end
