import java.util.PriorityQueue

fun main(args: Array<String>) {
    val (x, y, z, k) = readInputLine().split(" ").map { it.toInt() }
    val aList = readInputLine().split(" ").map { it.toLong() }.sortedDescending()
    val bList = readInputLine().split(" ").map { it.toLong() }.sortedDescending()
    val cList = readInputLine().split(" ").map { it.toLong() }.sortedDescending()
    
    val alreadyAdded = mutableListOf(Triple(0, 0, 0))
    
    val queue = PriorityQueue<Pair<Long, Triple<Int, Int, Int>>>(k, {x, y -> if (x.first > y.first) -1 else if (x.first == y.first) 0 else 1})
    queue.add(Pair(aList[0] + bList[0] + cList[0], Triple(0, 0, 0)))
    
    for (i in 1..k) {
        val (p, triple) = queue.poll()
        val (px, py, pz) = triple
        
        println(p)
        
        if (px < x - 1 && !alreadyAdded.contains(Triple(px + 1, py, pz))) {
            queue.add(Pair(aList[px + 1] + bList[py] + cList[pz], Triple(px + 1, py, pz)))
            alreadyAdded.add(Triple(px + 1, py, pz))
        }
        if (py < y - 1 && !alreadyAdded.contains(Triple(px, py + 1, pz))) {
            queue.add(Pair(aList[px] + bList[py + 1] + cList[pz], Triple(px, py + 1, pz)))
            alreadyAdded.add(Triple(px, py + 1, pz))
        }
        if (pz < z - 1 && !alreadyAdded.contains(Triple(px, py, pz + 1))) {
            queue.add(Pair(aList[px] + bList[py] + cList[pz + 1], Triple(px, py, pz + 1)))
            alreadyAdded.add(Triple(px, py, pz + 1))
        }
    }
}

fun readInputLine(): String {
    return readLine()!!
}
