x, y, z, k = gets.split.map(&:to_i)
a = gets.split.map(&:to_i).sort_by{|e| -e}
b = gets.split.map(&:to_i).sort_by{|e| -e}
c = gets.split.map(&:to_i).sort_by{|e| -e}

M = 1 << 35
@h = Array.new(k+1, M)
@l = 0

def enque(v)
    i = @l += 1
    @h[i] = v

    while i > 1 && @h[i] < @h[i/2]
        @h[i], @h[i/2] = @h[i/2], @h[i]
        i /= 2
    end
end

def deque
    x = @h[1]
    @h[1] = @h[@l] if @l > 1
    @h[@l] = M
    @l -= 1
    i = 1

    while i * 2 <= @l
        j = @h[i*2] < @h[i*2+1] ? i*2 : i*2+1
        break if @h[i] <= @h[j]
        @h[i], @h[j] = @h[j], @h[i]
        i = j
    end

    x
end

x.times do |xx|
    fy = y.times do |yy|
        fz = z.times do |zz|
            break zz if @l == k && a[xx] + b[yy] + c[zz] <= @h[1]
            deque if @l == k
            enque(a[xx] + b[yy] + c[zz])
        end

        break yy if fz == 0
    end

    break if fy == 0 
end

ans = []
k.times {ans << deque}
puts ans.reverse
