import java.util.PriorityQueue;
import java.util.Collections;
import java.util.Comparator;

data class position(val x: Int, val y: Int, val z: Int)
data class score(val score: Long, val pos: position) : Comparable<score> {
     override operator fun compareTo(other: score): Int{ return if(score < other.score){1}else if(score == other.score){0}else{-1} }
}

fun main(args : Array<String>) {
    val (xc,yc,zc,k) = readLine()!!.split(" ").map{n->n.toInt()};
    val a = readLine()!!.split(" ").map({n->n.toLong()}).sortedDescending()
    val b = readLine()!!.split(" ").map({n->n.toLong()}).sortedDescending()
    val c = readLine()!!.split(" ").map({n->n.toLong()}).sortedDescending()
    
    
    var pq = PriorityQueue<score>( );
    val hash = hashSetOf<position>()
    
    val push = {x:Int,y:Int,z:Int -> 
        val t = position(x,y,z);
    	if(!hash.contains(t) && a.size > x && b.size > y && c.size > z){
            hash.add(t)
            pq.add(score(a[x] + b[y] + c[z],position(x,y,z)))
        }
    }
    push(0,0,0)
    
    for(i in 0..k-1){
        val r = pq.poll();
        println(r.score);
        push(r.pos.x+1,r.pos.y,r.pos.z);
        push(r.pos.x,r.pos.y+1,r.pos.z);
        push(r.pos.x,r.pos.y,r.pos.z+1);
    }
}