module Main where

import           Control.Monad
import           Data.List
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
  mapM_ print $ f as bs cs k

f as bs cs k =
  let ab = take k . sortBy (flip compare) $ [ a + b | a <- as, b <- bs ]
  in  take k . sortBy (flip compare) $ [ a + c | a <- ab, c <- cs ]
