import Data.List
import Control.Monad

main = do
       l1<-getLine
       l2<-getLine
       l3<-getLine
       l4<-getLine
       let (_:_:_:k:[])=map read (words l1)::[Int]
           as=reverse $ sort $ map read (words l2)::[Int]
           bs=reverse $ sort $ map read (words l3)::[Int]
           cs=reverse $ sort $ map read (words l4)::[Int]
       mapM_ putStrLn $ take k $ map show $ reverse $ sort $ [e1+e2+e3|e1<-as,e2<-bs,e3<-cs]