(X, Y, Z, K), As, Bs, Cs = readlines.map{|l| l.split.map(&:to_i)}

as, bs, cs = [As, Bs, Cs].map{|xs| [nil] + xs.sort.reverse}
ds = []
(1 .. X).each do |i|
  (1 .. Y).each do |j|
    (1 .. Z).each do |k|
      if i*j*k <= K
        ds << as[i] + bs[j] + cs[k] if i*j*k <= K
      else
        break
      end
    end
  end
end
puts ds.sort.reverse.take(K)