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 = [{
    p: A[0]+B[0]+C[0],
    x: 0,
    y: 0,
    z: 0
}];

const done = {};

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

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

Array.from(Array(K)).forEach(() => {
    const largest = queue.sort((a,b)=>a.p-b.p).pop();
    result.push(largest);
    const x = largest.x;
    const y = largest.y;
    const z = largest.z;
    done[`${x},${y},${z}`] = 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.map(v => v.p).join('\n'));