object Main {

  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)

    val X, Y, Z, K = sc.nextInt()
    val A = Array.fill(X)(sc.nextLong())
    val B = Array.fill(Y)(sc.nextLong())
    val C = Array.fill(Z)(sc.nextLong())

    val size = Math.min(X * Y, K)
    val AB = (for {
      i <- 0 until X
      j <- 0 until Y
    } yield A(i) + B(j))
      .sorted(Ordering.Long.reverse)

    println((for {
      i <- 0 until size
      j <- 0 until Z
    } yield AB(i) + C(j))
      .sorted(Ordering.Long.reverse)
      .take(K)
      .mkString("\n"))
  }

}

