import java.util.Scanner

object Main {
  val sc = new Scanner(System.in)
  def main(args: Array[String]): Unit = {
    val x  = sc.nextInt
    val y  = sc.nextInt
    val z  = sc.nextInt
    val k  = sc.nextInt
    val al = Vector.fill(x)(sc.nextLong).sorted.reverse
    val bl = Vector.fill(y)(sc.nextLong).sorted.reverse
    val cl = Vector.fill(z)(sc.nextLong).sorted.reverse

    val u = for{
      i1 <- al
      i2 <- bl
      i3 <- cl
    } yield i1 + i2 + i3


    val res = u.sorted.reverse.take(k)

    res.foreach(println)
  }
}