x, y, z, k = gets.split.map(&:to_i)
A = gets.split.map(&:to_i).sort_by {|a| -a}
B = gets.split.map(&:to_i).sort_by {|b| -b}
C = gets.split.map(&:to_i).sort_by {|c| -c}

a_plus_b = []
A.each do |a|
  B.each do |b|
    a_plus_b << a + b
  end
end

a_plus_b = a_plus_b.sort_by {|a| -a}.take(k)

sum = []
a_plus_b.each do |ab|
  C.each do |c|
    sum << ab + c
  end
end

sum.sort_by {|s| -s}.take(k).each do |s|
  p s
end
