#二分ヒープ
class BinaryHeap
  def initialize(n, &b)
    @heap = Array.new(n)
    @size = 0
    #ex) |parent, child| parent <= child
    @b = b
  end
  def push(x)
    @size += 1
    upfrom(@size - 1, x)
  end
  def shift
    wk = @heap[0]
    @size -= 1
    downfrom(0, @heap[@size])
    wk
  end

  private

  def upfrom(i, x)
    me = i
    while 0 < me do
      parent = (me - 1) >> 1
      break if @b.call(@heap[parent], x)
        @heap[me] = @heap[parent]
        me = parent
    end
    @heap[me] = x
  end
  def downfrom(i, x)
    me = i
    while me < @size do
      child = (me << 1) + 1
      break if child >= @size
      if (child + 1) < @size && @b.call(@heap[child + 1], @heap[child]) then
        child += 1
      end
      break if @b.call(x, @heap[child])
      @heap[me] = @heap[child]
      me = child
    end
    @heap[me] = x
  end
end

X, Y, Z, K = gets.chomp.split(" ").map(&:to_i)
A = gets.chomp.split(" ").map(&:to_i)
B = gets.chomp.split(" ").map(&:to_i)
C = gets.chomp.split(" ").map(&:to_i)

bh = BinaryHeap.new(K){|parent, child| parent[0] >= child[0]}
A.sort!.reverse!
B.sort!.reverse!
C.sort!.reverse!
ia, ib, ic = [0, 0, 0]
bh.push([A[0]+B[0]+C[0], 0, 0, 0])

K.times{
  wk = bh.shift
  puts wk[0]
  oa, ob, oc = [ia, ib, ic]
  fa, fb, fc = [false, false, false]
  (ia += 1; fa = true) if wk[1] == ia && ia < X - 1
  (ib += 1; fb = true) if wk[2] == ib && ib < Y - 1
  (ic += 1; fc = true) if wk[3] == ic && ic < Z - 1
  if fa then
    (0..ob).each{|b|
      (0..oc).each{|c|
        bh.push([A[ia]+B[b]+C[c], ia, b, c])
      }
    }
  end
  if fb then
    (0..oa).each{|a|
      (0..oc).each{|c|
        bh.push([A[a]+B[ib]+C[c], a, ib, c])
      }
    }
  end
  if fc then
    (0..oa).each{|a|
      (0..ob).each{|b|
        bh.push([A[a]+B[b]+C[ic], a, b, ic])
      }
    }
  end
  if fa && fb then (0..oc).each{|c| bh.push([A[ia]+B[ib]+C[c], ia, ib, c])} end
  if fa && fc then (0..ob).each{|b| bh.push([A[ia]+B[b]+C[ic], ia, b, ic])} end
  if fb && fc then (0..oa).each{|a| bh.push([A[a]+B[ib]+C[ic], a, ib, ic])} end
  if fa && fb && fc then bh.push([A[ia]+B[ib]+C[ic], ia, ib, ic]) end
}
