import java.util.*

fun main(arr:Array<String>) {
    val (x,y,z,k) = readLine()!!.split(" ").map { it.toInt() }
    val cake1 = readLine()!!.split(" ").map { it.toLong() }.sorted()
    val cake2 = readLine()!!.split(" ").map { it.toLong() }.sorted()
    val cake3 = readLine()!!.split(" ").map { it.toLong() }.sorted()

    val cake12 = PriorityQueue<Long>()
    for(i in cake1) {
        for(j in cake2) {
            cake12.add((i+j)*-1)
        }
    }
    val cake123 = PriorityQueue<Long>()
    for(i in (0 until k)) {
        val tmp = cake12.poll()
        for(j in cake3){
            cake123.add(tmp - j)
        }
        if(cake12.isEmpty()) {
            break
        }
    }
    for(i in (0 until k)) {
        println(cake123.poll()*-1)
    }
}