var GET=(function(){function f(s){return new g(s);}function g(s){this._s=s.trim().split("\n");this._y=0;}g.prototype.a=function(f){var s=this._s, y=this._y, r;if(typeof s[y]==="string")s[y]=s[y].split(" ").reverse();r=s[y].pop();if(!s[y].length)this._y++;return f?r:+r;};g.prototype.l=function(f){var s=this._s[this._y++].split(" ");return f?s:s.map(a=>+a);};g.prototype.m=function(n,f){var r=this._s.slice(this._y,this._y+=n).map(a=>a.split(" "));return f?r:r.map(a=>a.map(a=>+a));};g.prototype.r=function(n,f){var r=this._s.slice(this._y,this._y+=n);return f?r:r.map(a=>+a);};return f;})();
var o=GET(require("fs").readFileSync("/dev/stdin","utf8"));
function xArray(v){var a=arguments,l=a.length,r="Array(a["+--l+"]).fill(v)";while(--l)r="Array(a["+l+"]).fill(0).map(x=>"+r+")";return eval(r);}

console.log(main());
function main(){
  var x = o.a();
  var y = o.a();
  var z = o.a();
  var k = o.a();
  var a = o.l().concat(-1e15).sort((a,b)=>b-a);
  var b = o.l().concat(-1e15).sort((a,b)=>b-a);
  var c = o.l().concat(-1e15).sort((a,b)=>b-a);
  var ans = [];
  var u = [[a[1]+b[0]+c[0],1,0,0],[a[0]+b[1]+c[0],0,1,0],[a[0]+b[0]+c[1],0,0,1]];
  var set = new Set();
  ans[0] = a[0]+b[0]+c[0];
  set.add(f(0,0,0));
  for(var i = 1; i < k; i++){
    u.sort((a,b)=>a[0]-b[0]);
    var t = u.pop();
    ans[i] = t[0];
    set.add(f(t[1],t[2],t[3]));
    if((t[2] === 0 || set.has(f(t[1]+1,t[2]-1,t[3])))
    && (t[3] === 0 || set.has(f(t[1]+1,t[2],t[3]-1)))){
      u.push([a[t[1]+1]+b[t[2]]+c[t[3]],t[1]+1,t[2],t[3]]);
    }
    if((t[1] === 0 || set.has(f(t[1]-1,t[2]+1,t[3])))
    && (t[3] === 0 || set.has(f(t[1],t[2]+1,t[3]-1)))){
      u.push([a[t[1]]+b[t[2]+1]+c[t[3]],t[1],t[2]+1,t[3]]);
    }
    if((t[1] === 0 || set.has(f(t[1]-1,t[2],t[3]+1)))
    && (t[2] === 0 || set.has(f(t[1],t[2]-1,t[3]+1)))){
      u.push([a[t[1]]+b[t[2]]+c[t[3]+1],t[1],t[2],t[3]+1]);
    }
  }
  return ans.join("\n");
}
function f(a,b,c){
  return a+","+b+","+c;
}