import           Control.Exception          (assert)
import           Control.Monad.State.Strict (State, evalState, gets, modify,
                                             runState)
import           Data.Foldable              (for_)
import           Data.List                  (sortOn)
import           Data.Map.Strict            (Map)
import qualified Data.Map.Strict            as M (empty, insert, lookup)
import           Data.Ord                   (Down (Down))

main :: IO ()
main = do
  [x, y, z, k] <- map read . words <$> getLine
  as <- map read . words <$> getLine
  bs <- map read . words <$> getLine
  cs <- map read . words <$> getLine
  assert (length as == x && length bs == y && length cs == z) $
    for_ (solve' k as bs cs) print

solve :: Int -> [Int] -> [Int] -> [Int] -> [Int]
solve k as bs cs = take k $ sortOn Down $ map sum $ sequence [as, bs, cs]

solve' :: Int -> [Int] -> [Int] -> [Int] -> [Int]
solve' k as bs cs = take k $ sortOn Down $ map sum $ (`evalState` M.empty) $ do
  asbs <- sequence $ memoPlus <$> as <*> bs
  pure $ sequence [asbs, cs]

type Memo = Map (Int, Int) Int

memoPlus :: Int -> Int -> State Memo Int
memoPlus n m = do
  let key = (n, m)
  mAnswer <- gets $ M.lookup key
  case mAnswer of
    Nothing -> do
      let l = n + m
      modify (M.insert key l)
      pure l
    Just l -> pure l
