import scala.collection.mutable.ArrayBuffer

object Scanner {
  private val buf = new Array[Byte](1024);
  private var ptr = 0;
  private var len = 0

  @inline private def isPrintableChar(c: Int): Boolean = 33 <= c && c <= 126

  @inline private def hasNextByte(): Boolean =
    if (ptr >= len) {
      ptr = 0; len = System.in.read(buf); len > 0
    } else {
      true
    }

  @inline private def hasNext(): Boolean = {
    while (hasNextByte() && !isPrintableChar(buf(ptr))) ptr += 1
    hasNextByte()
  }

  @inline private def readByte(): Byte =
    if (hasNextByte()) {
      val res = buf(ptr); ptr += 1; res
    } else {
      -1
    }

  def next(): String = {
    if (!hasNext()) ???
    val sb = new StringBuilder;
    var b = readByte()
    while (isPrintableChar(b)) {
      sb.append(b.toChar); b = readByte()
    }
    sb.toString
  }

  def nextInt(): Int = {
    val n = nextLong()
    if (n < Int.MinValue || Int.MaxValue < n) ???
    n.toInt
  }

  def nextLong(): Long = {
    if (!hasNext()) ???
    var minus = false;
    var b = readByte()
    if (b == '-') {
      minus = true; b = readByte()
    }

    def go(b: Byte, n: Long = 0): Long =
      if ('0' <= b && b <= '9') {
        go(readByte(), n * 10 + b - '0')
      }
      else if (minus) {
        -n
      } else {
        n
      }

    go(b)
  }

  def nextDouble(): Double = next.toDouble
}

object Main extends App {
  val x = Scanner.nextInt()
  val y = Scanner.nextInt()
  val z = Scanner.nextInt()
  val k = Scanner.nextInt()

  val a = Array.fill(x)(Scanner.nextLong()).sorted.reverse
  val b = Array.fill(y)(Scanner.nextLong()).sorted.reverse
  val c = Array.fill(z)(Scanner.nextLong()).sorted.reverse

  val input = Array(a,b,c).sortBy(_.length).reverse

  var i1 = 0
  var i2 = 0
  var i0 = 0

  var answerArray = new ArrayBuffer[Long]
  var min = Long.MaxValue

  while(i0<input(0).length){
    val sum = input(0)(i0)+input(1)(i1)+input(2)(i2)
    if (answerArray.length<k){
      answerArray = answerArray :+ sum
      if (sum < min) {
        min = sum
      }
      i2 = i2 + 1
    } else if ( min < sum ) {
      answerArray(answerArray.zipWithIndex.minBy(_._1)._2) = sum
      min = answerArray.min
      i2 = i2 + 1
    } else {
      i2 = 0
      i1 = i1 + 1
    }
    if (i2>=input(2).length){
      i2 = 0
      i1 = i1 + 1
    }
    if (i1>=input(1).length){
      i1 = 0
      i0 = i0 + 1
    }
  }
  answerArray = answerArray.sortBy(_*(-1))
  val pw = new java.io.PrintWriter(System.out)
  answerArray.foreach(i=>pw.println(i))
  pw.flush()
}