'use strict'
function Main(input) {
  const tmp = input.trim().split("\n");
  let Arr = tmp[0].split(" ").map(Number);
  let num = Arr.pop();
  let cake0 = tmp[1].split(" ").map(Number);
  let cake1 = tmp[2].split(" ").map(Number);
  let cake2 = tmp[3].split(" ").map(Number);
  let Cake = [cake0, cake1, cake2];
  // console.log({ Arr, num });
  // console.log({ Cake0 });
  // console.log({ Cake1 });
  // console.log({ Cake2 });
  
  for (let i = 0; i < 3; i++) {
    Cake[i].sort((a, b) => b - a);
  }
  // console.log({ Cake });
  
  let maxList = [];

  for (let i = 0; i < Arr[0]; i++){
    for (let j = 0; j < Arr[1]; j++){
      for (let k = 0; k < Arr[2]; k++){
        if ((i + 1) * (j + 1) * (k + 1) <= 3000) {
          maxList.push((Cake[0][i]) + (Cake[1][j]) + (Cake[2][k]));
        } else {
          break;
        }
      }
    }
  }
  maxList.sort((a, b) => b - a);
  let Answer = maxList.slice(0, num);

console.log(Answer.join('\n'));

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