object Main extends App {
var k = readLine.split(" ")(3).toInt
var a, b, c = readLine.split(" ").map(_.toLong)
var sum = for (v1 <- a; v2 <- b) yield {
v1 + v2
}
java.util.Arrays.sort(sum)
var len = math.min(sum.length, k)
var temp = new Array[Long](len)
for (i <- 0 to len - 1) {
temp(i) = sum(sum.length - 1 - i)
}
var sum2 = for (v1 <- temp; v2 <- c) yield {
v1 + v2
}
java.util.Arrays.sort(sum2)
val out = new java.io.PrintWriter(System.out)
for (i <- 0 to k - 1) {
out.println(sum2(sum2.length - 1 - i))
}
out.flush
}