<?php

$is_honban = 1;

if ($is_honban) {
  error_reporting(0);
  //----------------------------------------------------------------------------------
  // Input for honban
  //----------------------------------------------------------------------------------
  $sc = new Scanner();
  $X = $sc->nextInt();
  $Y = $sc->nextInt();
  $Z = $sc->nextInt();
  $K = $sc->nextInt();

  $A = array();
  $B = array();
  $C = array();
  for ($i = 0; $i < $X; $i++) {
    $A[] = $sc->nextInt();
  }
  for ($i = 0; $i < $Y; $i++) {
    $B[] = $sc->nextInt();
  }
  for ($i = 0; $i < $Z; $i++) {
    $C[] = $sc->nextInt();
  }


} else {
  //----------------------------------------------------------------------------------
  // Input for test
  //----------------------------------------------------------------------------------
  error_reporting(E_ERROR | E_WARNING | E_PARSE);

  $n = 5;
  $a = array(3,2,4,3,5);



}
//----------------------------------------------------------------------------------
// Main
//----------------------------------------------------------------------------------

//$ans = 0;
$ans = array();

rsort($A);
rsort($B);
rsort($C);
/*
for ($i = 0; $i < 15; $i++) {
  for ($j = 0; $j < 15; $j++) {
    for ($k = 0; $k < 15; $k++) {
      $ans[] = $A[$i] + $B[$j] + $C[$k];
    }
  }
}

for ($i = 0; $i < 15; $i++) {
  for ($j = 15; $j < $Y; $j++) {
    for ($k = 15; $k < $Z; $k++) {
      $ans[] = $A[$i] + $B[$j] + $C[$k];
    }
  }
}

for ($i = 15; $i < $X; $i++) {
  for ($j = 0; $j < 15; $j++) {
    for ($k = 15; $k < $Z; $k++) {
      $ans[] = $A[$i] + $B[$j] + $C[$k];
    }
  }
}

for ($i = 15; $i < $X; $i++) {
  for ($j = 15; $j < $Y; $j++) {
    for ($k = 0; $k < 15; $k++) {
      $ans[] = $A[$i] + $B[$j] + $C[$k];
    }
  }
}*/

for ($i = 0; $i < $X; $i++) {
  for ($j = 0; $j < $Y; $j++) {
    if (($i+1) * ($j+1) > 3000) { continue 2; }
    for ($k = 0; $k < $Z; $k++) {
      if (($i+1) * ($j+1) * ($k+1) > 3000) { continue 2; }
      $ans[] = $A[$i] + $B[$j] + $C[$k];
    }
  }
}

rsort($ans);



//----------------------------------------------------------------------------------
// Output
//----------------------------------------------------------------------------------
//out::println($ans);

for ($i = 0; $i < $K; $i++) {
  out::println($ans[$i]);
}

//----------------------------------------------------------------------------------
// Ref: https://qiita.com/yoshikyoto/items/6924478283dbdd549e4b
//----------------------------------------------------------------------------------
class Scanner {
  private $arr = array();
  private $count = 0;
  private $pointer = 0;
  public function next() {
    if($this->pointer >= $this->count) {
      $str = trim(fgets(STDIN));
      $this->arr = explode(' ', $str);
      $this->count = count($this->arr);
      $this->pointer = 0;
    }
    $result = $this->arr[$this->pointer];
    $this->pointer++;
    return $result;
  }
  public function hasNext() {
    return $this->pointer < $this->count;
  }
  public function nextInt() {
    return (int)$this->next();
  }
  public function nextDouble() {
    return (double)$this->next();
  }
}

class out {
  public static function println($str = "") {
    echo $str . PHP_EOL;
  }
}

?>


Measured memory_bytes: 20468