fun main(args: Array<String>) {
    val (X, Y, Z, K) = listOfInt()
    val A = listOfLong().sortedDescending()
    val B = listOfLong().sortedDescending()
    val C = listOfLong().sortedDescending()
    val D = mutableListOf<Long>()
    for (x in 0 until X) {
        for (y in 0 until Y) {
            if ((x + 1) * (y + 1) > K) break
            for (z in 0 until Z) {
                if ((x + 1) * (y + 1) * (z + 1) > K) break
                D.add(A[x] + B[y] + C[z])
            }
        }
    }
    val ans = D.sortedDescending()
    for (k in 0 until K) println(ans[k])
}
fun next() = readLine()!!
fun listOfString() = next().split(" ")
fun listOfInt() = listOfString().map(String::toInt)
fun listOfLong() = listOfString().map(String::toLong)