function Main(input) {
  var tmp = input.trim().split("\n");
  var XYZK = tmp[0].split(/\s/).map(val => parseInt(val, 10));
  var X = XYZK[0];
  var Y = XYZK[1];
  var Z = XYZK[2];
  var K = XYZK[XYZK.length - 1];
  var AAry = tmp[1].split(/\s/).map(val => parseInt(val, 10));
  var BAry = tmp[2].split(/\s/).map(val => parseInt(val, 10));
  var CAry = tmp[3].split(/\s/).map(val => parseInt(val, 10));

  //console.log(X, Y, Z, K, AAry, BAry, CAry);
  var sumAry = [];

  for (var i = 0; i < AAry.length; i++) {
    for (var j = 0; j < BAry.length; j++) {
      for (var k = 0; k < CAry.length; k++) {
        sumAry.push(AAry[i] + BAry[j] + CAry[k]);
      }
    }
  }
  sumAry.sort((a, b) => b - a);
  for (var l = 0; l < K; l++) {
    console.log(sumAry[l]);
  }
}

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