module Main where

import           Control.Monad
import           Data.List
import           Data.Ord
import           Data.List.Split
import           Data.Array.IO
import qualified Data.Vector.Unboxed           as V
import           Text.Printf

main :: IO ()
main = do
  [x,y,z,k] <- map read . words <$> getLine
  [as, bs, cs] <- replicateM 3 $ map read . words <$> getLine

  let ab  = take k . sortOn Down . map sum $ sequence [as, bs]
      abc = take k . sortOn Down . map sum $ sequence [ab, cs]
  mapM_ print abc
