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()).sorted(Ordering.Long.reverse)
    val B = Array.fill(Y)(sc.nextLong()).sorted(Ordering.Long.reverse)
    val C = Array.fill(Z)(sc.nextLong()).sorted(Ordering.Long.reverse)

    println((for {
      i <- 0 until X
      j <- 0 until Y if (i + 1) * (j + 1) <= K
      k <- 0 until Z if (i + 1) * (j + 1) * (k + 1) <= K
    } yield A(i) + B(j) + C(k)).sorted(Ordering.Long.reverse).take(K).mkString("\n"))
  }

}

