(X, Y, Z, K), As, Bs, Cs = readlines.map{|l| l.split.map(&:to_i)}

@as, @bs, @cs = [As, Bs, Cs].map{|xs| xs.sort.reverse}

def ng?(p, k)
  cnt = 0
  @as.each do |a|
    @bs.each do |b|
      @cs.each do |c|
        break if a + b + c < p
        cnt += 1
        return false if cnt >= k
      end
    end
  end
  true
end

l = (1 .. @as[0] + @bs[0] + @cs[0]).bsearch{|p| ng?(p, K)}
ans = []
@as.each do |a|
  @bs.each do |b|
    @cs.each do |c|
      t = a + b + c
      break if t < l - 1
      ans << t
    end
  end
end
ans.sort!.reverse!
puts ans.size < K ? ans + [b] : ans