'use strict';

function Main(input) {
  const X = input.split("\n")[0].split(" ")[0]
  const Y = input.split("\n")[0].split(" ")[1]
  const Z = input.split("\n")[0].split(" ")[2]
  const K = input.split("\n")[0].split(" ")[3]
  const As = input.split("\n")[1].split(" ")
  const Bs = input.split("\n")[2].split(" ")
  const Cs = input.split("\n")[3].split(" ").sort((a, b) => Number(a) < Number(b) ? 1 : -1)

  const ABs = []
  for (let i=0; i<X; i++) {
    for (let j=0; j<Y; j++) {
      ABs.push(Number(As[i]) + Number(Bs[j]))
    }
  }
  const ABsorted = ABs.sort((a, b) => a < b ? 1 : -1).slice(0, Math.min(X * Y, 3000))

  const ABCs = []
  
  for (let k=0; k<Z; k++) {
    for (let AB of ABsorted) {
      ABCs.push(Number(Cs[k]) + AB)
    }
  }
  const ABCsorted = ABCs.sort((a, b) => a < b ? 1 : -1).slice(0, Math.min(X * Y * Z, 3000))

  for (let l=0; l<K; l++) {
    console.log(ABCsorted[l])
  }

};

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
