"use strict";
function Main(input) {
    let lines = input.split("\n");
    let xyzk = lines.shift().split(/\s/).map((v) => v - 0);
    let X = xyzk[0], Y = xyzk[1], Z = xyzk[2], K = xyzk[3];
    let A = lines.shift().split(/\s/).map((v) => v - 0).sort((a, b) => b - a);
    let B = lines.shift().split(/\s/).map((v) => v - 0).sort((a, b) => b - a);
    let C = lines.shift().split(/\s/).map((v) => v - 0).sort((a, b) => b - a);
    let abcL = Math.min(K, X * Y * X);
    let abc = new Array(abcL);
    let i = 0;
    for (let x = 0; x < X; x++) {
        for (let y = 0; y < Y; y++) {
            if ((x+1)*(y+1) > K) break;
            for (let z = 0; z < Y; z++) {
                if ((x+1)*(y+1)*(z+1) > K) break;
                abc[i++] = A[x] + B[y] + C[z];
            }
        }
    }
    abc.sort((a, b) => b - a);
    for (let n = 0; n < K; n++) {
        console.log(abc[n]);
    }
}
if (typeof window === 'undefined') Main(require("fs").readFileSync("/dev/stdin", "utf8"));
