const input = require('fs').readFileSync('/dev/stdin', 'utf-8').split('\n');
const meta = input[0];
const a = input[1];
const b = input[2];
const c = input[3];

const metaD = meta.trim().split(' ').map(i => parseInt(i));
const X = metaD[0];
const Y = metaD[1];
const Z = metaD[2];
const K = metaD[3];
const A = a.trim().split(' ').map(i => parseInt(i)).slice(0,X).sort((a,b)=>b-a);
const B = b.trim().split(' ').map(i => parseInt(i)).slice(0,Y).sort((a,b)=>b-a);
const C = c.trim().split(' ').map(i => parseInt(i)).slice(0,Z).sort((a,b)=>b-a);

const result = [];
const queue = {
    '0,0,0': A[0]+B[0]+C[0]
}

const done = {};

const addToQueue = (p,x,y,z) => {
    const d = `${x},${y},${z}`;
    if (!queue[d]
    && !done[d]) {
        queue[d] = p;
    }
}

const min = (i,arr) => Math.min(i,arr.length - 1);

Array.from(Array(K)).forEach(() => {
    const largest = Object.keys(queue).sort((a,b)=>queue[a]-queue[b]).pop();
    result.push(queue[largest]);
    delete queue[largest];
    const xyz = largest.split(',').map(i=>parseInt(i));
    const x = xyz[0];
    const y = xyz[1];
    const z = xyz[2];
    done[largest] = true;
    addToQueue(A[min(x+1,A)]+B[y]+C[z],min(x+1,A),y,z);
    addToQueue(A[x]+B[min(y+1,B)]+C[z],x,min(y+1,B),z);
    addToQueue(A[x]+B[y]+C[min(z+1,C)],x,y,min(z+1,C));
});

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