class MaxHeap
  def initialize(&block)
    @array = []
    @score = block
  end

  def insert(key)
    @array.push(key)

    # sifting up
    index = @array.size - 1
    until index == 0
      pindex = (index - 1) / 2
      if (@score.(@array[index]) <=> @score.(@array[pindex])) <= 0
        break
      else
        @array[pindex], @array[index] = @array[index], @array[pindex]
        index = pindex
      end
    end
  end

  alias push insert

  def peek
    if @array.empty?
      fail 'empty'
    end

    @array[0]
  end

  def size
    @array.size
  end

  def empty?
    @array.empty?
  end

  def pop
    if @array.empty?
      fail 'empty'
    end

    top = @array[0]
    last = @array.pop
    if @array.empty?
      return top
    end

    @array[0] = last
    i = 0
    # sifting down
    while true
      break unless i*2 + 1 < @array.size

      if i*2 + 2 < @array.size &&
         (@score.(@array[i*2 + 1]) <=> @score.(@array[i*2 + 2])) <= 0
        if (@score.(@array[i*2 + 2]) <=> @score.(@array[i])) <= 0
          break
        else
          @array[i], @array[i*2 + 2] = @array[i*2 + 2], @array[i]
          i = i*2 + 2
        end
      else
        fail "logic error" unless i*2 + 1 < @array.size
        if (@score.(@array[i*2 + 1]) <=> @score.(@array[i])) <= 0
          break
        else
          @array[i], @array[i*2 + 1] = @array[i*2 + 1], @array[i]
          i = i*2 + 1
        end
      end
    end

    return top
  end
end

def degrade(ai, bi, ci)
  res = []
  if ai > 0
    res.push [ai - 1, bi, ci]
  end
  if bi > 0
    res.push [ai, bi - 1, ci]
  end
  if ci > 0
    res.push [ai, bi, ci - 1]
  end
  return res
end

_x, _y, _z, k = gets.split.map(&:to_i)
a = gets.split.map(&:to_i).sort
b = gets.split.map(&:to_i).sort
c = gets.split.map(&:to_i).sort

queue = MaxHeap.new { |ai, bi, ci|  a[ai] + b[bi] + c[ci] }
queue.push [a.size-1, b.size-1, c.size-1]
seen = {}

until k == 0
  ai, bi, ci = queue.pop

  puts a[ai] + b[bi] + c[ci]
  k -= 1

  paths = degrade(ai,bi,ci).reject { |path| seen[path] }
  paths.each do |path|
    seen[path] = true
  end
  paths.each do |path|
    queue.push(path)
  end
end
