X, Y, Z, K = gets.chomp.split(" ").map(&:to_i)

cakes_a = gets.chomp.split(" ").map(&:to_i).sort.reverse
cakes_b = gets.chomp.split(" ").map(&:to_i).sort.reverse
cakes_c = gets.chomp.split(" ").map(&:to_i).sort.reverse

puts cakes_a
    .product(cakes_b)
    .map {|ary| ary.inject(:+)}
    .sort
    .reverse
    .slice(0...K)
    .product(cakes_c)
    .map {|ary| ary.inject(:+)}
    .sort
    .reverse
    .slice(0...K)
