import java.io.PrintWriter
fun main(args: Array<String>) {
    val (X, Y, Z, K) = readLine()!!.split(" ").map(String::toInt)
    val A = readLine()!!.split(" ").map(String::toLong).sortedDescending()
    val B = readLine()!!.split(" ").map(String::toLong).sortedDescending()
    val C = readLine()!!.split(" ").map(String::toLong).sortedDescending()
    val ab = mutableListOf<Long>(0)
    for (i in 0 until X) {
        for (j in 0 until Y) {
            if ((i+1) * (j+1) > K) break
            ab.add(A[i] + B[j])
        }
    }
    ab.sortDescending()
    val li = mutableListOf<Long>(0)
    for (i in 0 until X * Y) {
        if (i + 1 > K) break
        for (j in 0 until Z) {
            if ((i+1) * (j+1) > K) break
            li.add(ab[i] + C[j])
        }
    }
    li.sortDescending()
    val pw = PrintWriter(System.out)
    for (i in 0 until K) {
        pw.println(li[i])
    }
    pw.flush()
}