import java.util.Scanner
object Main extends App {
  val sc = new Scanner(System.in)
  val x, y, z, k = sc.nextInt
  val as = Array.fill(x)(sc.nextLong)
  val bs = Array.fill(y)(sc.nextLong)
  val cs = Array.fill(z)(sc.nextLong)

  def merge(la: Array[Long], ra: Array[Long]): Array[Long] = {
    (for {
      l <- la
      r <- ra
    } yield l + r).sorted.takeRight(3000)
  }
  println(merge(merge(as, bs), cs).sorted.takeRight(k).reverse.mkString("\n"))
}