io = STDIN
x,y,z,k=io.gets.split.map(&:to_i)
max=[x,y,z].max
a=io.gets.split.map(&:to_i).sort.reverse+Array.new(1+max-x,0)
b=io.gets.split.map(&:to_i).sort.reverse+Array.new(1+max-y,0)
c=io.gets.split.map(&:to_i).sort.reverse+Array.new(1+max-z,0)
am,bm,cm=[],[],[]
am << a.shift
bm << b.shift
cm << c.shift
1000.times do |i|
  if a[0]>=b[0] && a[0]>=c[0]
    am<<a.shift
  elsif b[0]>=a[0] && b[0]>=c[0]
    bm<<b.shift
  else
    cm<<c.shift
  end
  break if a.size==1 && b.size==1 && c.size==1
  break if am.size*bm.size*cm.size>3000
end
ar=[]
am.each do |i|
bm.each do |j|
cm.each do |k|
  ar << i+j+k
end
end
end
puts ar.sort.reverse[0...k]
