require 'pp'

X,Y,Z,K = readline.chomp.split.map(&:to_i)
A = readline.chomp.split.map(&:to_i).sort!.reverse
B = readline.chomp.split.map(&:to_i).sort!.reverse
C = readline.chomp.split.map(&:to_i).sort!.reverse

result = Array.new(K,0)

$memo = {}
def calc(a,b,c)
  key = a*1_000_000 + b*1000 + c
  return $memo[key] if $memo[key]
  x = A[a]+B[b]+C[c]
  $memo[key] = x
  x
end

ma = 0
mb = 0
mc = 0
heads = {}
heads[ma*1_000_000+mb*1_000+mc] = true
current = calc(0,0,0)

K.times do |k|
  puts current
  max = 0
  # pp current, heads
  heads.each do |abc,n|
    a,b,c = abc/1000_000, (abc/1000)%1000, abc%1000
    if a + 1 < X and !heads.has_key?((a+1)*1_000_000+b*1000+c)
      x = calc(a+1,b,c)
      if x > max and x <= current
        max = x
        ma = a+1; mb = b; mc = c
      end
    end
    if b + 1 < Y and !heads.has_key?(a*1_000_000+(b+1)*1000+c)
      x = calc(a,b+1,c)
      if x > max and x <= current
        max = x
        ma = a; mb = b+1; mc = c
      end
    end
    if c + 1 < Z and !heads.has_key?(a*1_000_000+b*1000+(c+1))
      x = calc(a,b,c+1)
      if x > max and x <= current
        max = x
        ma = a; mb = b; mc = c+1
      end
    end
  end
  current = max
  heads[ma*1_000_000+mb*1_000+mc] = true
end

