"use strict";
class QElement{constructor(element,priority){this.element=element;this.priority=priority}}class PriorityQueue{constructor(){this.items=[]}enqueue(element,priority){var qElement=new QElement(element,priority);var contain=false;for(var n=0;n<this.items.length;n++){if(this.items[n].priority<qElement.priority){this.items.splice(n,0,qElement);contain=true;break}}if(!contain){this.items.push(qElement)}}dequeue(){if(this.isEmpty())return"Underflow";return this.items.shift()}front(){if(this.isEmpty())return"No elements in Queue";return this.items[0]}rear(){if(this.isEmpty())return"No elements in Queue";return this.items[this.items.length-1]}isEmpty(){return this.items.length==0}printPQueue(){var str="";for(var n=0;n<this.items.length;n++)str+=this.items[n].element+" ";return str}}
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);
    A.push(-1e12);
    B.push(-1e12);
    C.push(-1e12);
    const d4 = (n) => ('0000' + n).slice(-4);
    const hashed = (a, b, c) => d4(a) + d4(b) + d4(c);

    let pq = new PriorityQueue();
    let s = new Set();
    pq.enqueue([0, 0, 0], A[0] + B[0] + C[0]);
    s.add(hashed(0, 0, 0));
    let ans = [];
    while (ans.length < K) {
        let v = pq.dequeue();
        ans.push(v.priority);
        for (let n = 0; n < 3; n++) {
            let a = v.element[0]; if (n == 0) a++;
            let b = v.element[1]; if (n == 1) b++;
            let c = v.element[2]; if (n == 2) c++;
            let hash = hashed(a, b, c);
            if (!s.has(hash)) {
                s.add(hash);
                pq.enqueue([a, b, c], A[a] + B[b] + C[c]);
            }
        }
    }
    for (let n = 0; n < K; n++) {
        console.log(ans[n]);
    }
}
if (typeof window === 'undefined') Main(require("fs").readFileSync("/dev/stdin", "utf8"));