import java.util.PriorityQueue

fun main(args : Array<String>) {
    val (X, Y, Z, K) = readLine()!!.split(" ").map { it.toLong() }
    val A = readLine()!!.split(" ").map { it.toLong() }.toMutableList()
    val B = readLine()!!.split(" ").map { it.toLong() }.toMutableList()
    val C = readLine()!!.split(" ").map { it.toLong() }.toMutableList()

    A.sortBy { it * -1 }
    B.sortBy { it * -1 }
    C.sortBy { it * -1 }

    class Candidate(val taste: Long, val x: Int, val y: Int, val z: Int) : Comparable<Candidate> {
        override fun compareTo(other: Candidate): Int {
            return (other.taste - this.taste).toInt()
        }
    }
    val priorityQueue = PriorityQueue<Candidate>()
    val set = mutableSetOf<Triple<Int, Int, Int>>()
    val topCandiate = Candidate(A[0] + B[0] + C[0], 0, 0, 0)
    priorityQueue.add(topCandiate)
    set.add(Triple(0,0, 0))

    var count = 0L
    while(true) {
        val ansI : Candidate = priorityQueue.poll()
        println(ansI.taste)
        count++
        if (count == K) {
            return
        }

        val newX = ansI.x + 1
        if (newX < X) {
            val ans = Triple(newX, ansI.y, ansI.z)
            val c = Candidate(A[newX] + B[ansI.y] + C[ansI.z], newX, ansI.y, ansI.z)
            if (!set.contains(ans)) {
                priorityQueue.add(c)
                set.add(ans)
            }
        }

        val newY = ansI.y + 1
        if (newY < Y) {
            val ans = Triple(ansI.x, newY, ansI.z)
            val c = Candidate(A[ansI.x] + B[newY] + C[ansI.z], ansI.x, newY, ansI.z)
            if (!set.contains(ans)) {
                priorityQueue.add(c)
                set.add(ans)
            }
        }

        val newZ = ansI.z + 1
        if (newZ < Z) {
            val ans = Triple(ansI.x, ansI.y, newZ)
            val c = Candidate(A[ansI.x] + B[ansI.y] + C[newZ], ansI.x, ansI.y, newZ)
            if (!set.contains(ans)) {
                priorityQueue.add(c)
                set.add(ans)
            }
        }
    }
}