"use strict";
function I(s,f){this._s=s.split("\n");this._c=0;this._l=0;this._f=f||Number}I.prototype.a=function(){var l=this._s[this._l];if(!l)return;var t=l.trim().split(" ");var a=t[this._c];this._c++;if(t.length===this._c){this._c=0;this._l++}return this._f(a)};I.prototype.l=function(){var l=this._s[this._l];if(!l)return;this._c=0;this._l++;return l.split(" ").map(this._f)};

function main(input) {
  const o = new I(input);

  var x = o.a();
  var y = o.a();
  var z = o.a();
  var k = o.a();

  var a = o.l();
  var b = o.l();
  var c = o.l();

  a.sort((a,b) => b-a);
  b.sort((a,b) => b-a);
  c.sort((a,b) => b-a);

  var ta = 0;
  var tb = 0;
  var tc = 0;

  var ai = 0, bi = 0, ci = 0;
  var count = (ai + 1) * (bi + 1) * (ci + 1);

  while (count < k) {
    if ( ta <= tb && ta <= tc) {
      ai += 1;
    } else if ( tb <= tc) {
      bi += 1;
    } else {
      ci += 1;
    }

    ta = (ai === a.length) ? Infinity : a[0] - a[ai];
    tb = (bi === b.length) ? Infinity : b[0] - b[bi];
    tc = (ci === c.length) ? Infinity : c[0] - c[ci];
    count = (ai + 1) * (bi + 1) * (ci + 1);
  }

  var tm = ta + tb + tc;
  while (a[0] - a[ai] <= tm) {
    ai += 1;
  }
  ai -= 1;
  while (b[0] - b[bi] <= tm) {
    bi += 1;
  }
  bi -= 1;
  while (c[0] - c[ci] <= tm) {
    ci += 1;
  }
  ci -= 1;

  var results = [];
  for(var ak = 0; ak <= ai; ak++){
    for(var bk = 0; bk <= bi; bk++){
      for(var ck = 0; ck <= ci; ck++){
        results.push(a[ak] + b[bk] + c[ck]);
      }
    }
  }

  results.sort((a,b)=> b - a);
  for(let i=0; i < k; i++) {
    console.log(results[i])
  }

  // var test = [];
  // for(var ak = 0; ak <= x -1; ak++){
  //   for(var bk = 0; bk <= y -1; bk++){
  //     for(var ck = 0; ck <= z-1; ck++){
  //       test.push({ r: a[ak] + b[bk] + c[ck], ak, bk, ck});
  //     }
  //   }
  // }
  // test.sort((a,b) => b.r - a.r);
  // console.log(test)
}


main(require("fs").readFileSync("/dev/stdin", "utf8"));
