class PriorityQueue
  def initialize
    @heap = [nil]
  end

  def up_heap(x, i, j, k)
    @heap << [x, i, j, k]
    idx = @heap.size - 1

    while idx != 1
      parent = idx / 2
      break if @heap[idx][0] < @heap[parent][0]

      @heap[idx], @heap[parent] = @heap[parent], @heap[idx]
      idx = parent
    end
  end

  def down_heap
    size = @heap.size
    return if size == 1
    return @heap.pop if size == 2

    max = @heap[1]
    @heap[1] = @heap.pop
    size -= 1
    idx = 1

    while idx * 2 < size
      l = idx * 2
      r = idx * 2 + 1

      if @heap[r]
        child = @heap[l][0] > @heap[r][0] ? l : r
      else
        child = l
      end

      break if @heap[idx][0] > @heap[child][0]

      @heap[idx], @heap[child] = @heap[child], @heap[idx]
      idx = child
    end

    max
  end

  alias_method :<<, :up_heap
  alias_method :push, :up_heap
  alias_method :shift, :down_heap
end

x, y, z, k = gets.split.map(&:to_i)
a = gets.split.map(&:to_i).sort_by { |i| -i }
b = gets.split.map(&:to_i).sort_by { |i| -i }
c = gets.split.map(&:to_i).sort_by { |i| -i }
q = PriorityQueue.new
h = Hash.new(true)

q.push(a[0] + b[0] + c[0], 0, 0, 0)
h[[0, 0, 0]] = nil

k.times do
  ret, i, j, k = q.shift

  if i + 1 < x && h[[i + 1, j, k]]
    q.push(a[i + 1] + b[j] + c[k], i + 1, j, k)
    h[[i + 1, j, k]] = nil
  end

  if j + 1 < y && h[[i, j + 1, k]]
    q.push(a[i] + b[j + 1] + c[k], i, j + 1, k)
    h[[i, j + 1, k]] = nil
  end

  if k + 1 < z && h[[i, j, k + 1]]
    q.push(a[i] + b[j] + c[k + 1], i, j, k + 1)
    h[[i, j, k + 1]] = nil
  end

  puts ret
end