object Main extends App {
  val in = scala.io.Source.stdin.getLines.toSeq
  val ls = in.map(_.split(' ').map(_.toLong))
  val hd = ls.head
  val K = hd(3).toInt
  val ll = ls.tail
  val A = ll(0).sorted.reverse
  val B = ll(1).sorted.reverse
  val C = ll(2).sorted.reverse
  
  var min = Long.MaxValue
  var q = Seq[Long]()
  var ai = 0
  while(ai < A.size){
    val a = A(ai)
    var bi = 0
    while(bi < B.size){
      val b = B(bi)
      var ci = 0
      while(ci < C.size){
        val c = C(ci)
        //println(a, b, c)
        val s = a+b+c
        if(q.length > K){
          if(min < s) q = q :+ s
        } else {
          q = q :+ s
          min = Math.min(min, s)
        }
        ci+=1
        if(s < min) ci = 2000
      }
      bi+=1
      //if(s < min) bi = 2000
    }
    ai+=1
    //if(s < min) ai = 2000
  }
  val ret = q.sorted.reverse.take(K)
  ret.foreach(println)
}
