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}

sum = []
0.upto(k-1) do |i|
  0.upto(C.size - 1) do |j|
    sum << a_plus_b[i] + C[j]
  end
end

sum = sum.sort_by {|s| -s}

0.upto(k-1) do |i|
  p sum[i]
end
