'use strict'
let input = require("fs").readFileSync("/dev/stdin", "utf8");
input = input.trim().split('\n');
let Nums = input[0].split(' ');
let Avol = Nums[0]*1;
let Bvol = Nums[1]*1;
let Cvol = Nums[2]*1;
let k = Nums[3]*1;
let As = input[1].split(' ').map(x => x*1).sort((a,b)=>{ return b - a });
let Bs = input[2].split(' ').map(x => x*1).sort((a,b)=>{ return b - a });
let Cs = input[3].split(' ').map(x => x*1).sort((a,b)=>{ return b - a });
let ans = [];

for(let a = 0; a < Avol; a++){
  for(let b = 0; b < Bvol; b++){
        if((a+1)*(b+1) > k){
        	break;
        }
  	for(let c = 0; c < Cvol; c++){
      	if((a+1)*(b+1)*(c+1) >k){
        	break;
        }
		ans.push(As[a] + Bs[b] + Cs[c]);  	
  	}
  }
}


for(let elm = 0; elm < k; elm++){
	console.log(ans[elm]);
}