"use strict";

const input = require("fs").readFileSync("/dev/stdin", "utf8").trim();

const inputs = input.split("\n");

const parse = (val) => val.split(" ").map(i => +i);

const sort = (arr) => arr.sort( (a, b) => b - a );

const transform = (arr) => sort(parse(arr));

const exec = (inputs) => {
  const firstLine = parse(inputs.shift());
  const K = firstLine[3];
  const As = transform(inputs[0]);
  const Bs = transform(inputs[1]);
  const Cs = transform(inputs[2]);

  const res = [];
  for (let a = 0; a < As.length; a++) {
    for (let b = 0; b < Bs.length; b++) {
      for (let c = 0; c < Cs.length; c++) {
        if (a * b * c <= K) {
          res.push(As[a] + Bs[b] + Cs[c]);
        }
      }
    }
  }
  return sort(res).slice(0, K);
}

console.log(exec(inputs).join("\n"));
