import Data.List
import Control.Monad

solver::[Int]->[Int]->[Int]->[Int]
solver as bs cs = let ab = take 3000 (sortBy (\ x -> \ y ->  compare y x) [a+b|a<-as,b<-bs]) in
                  take 3000 (sortBy (\ x -> \ y ->  compare y x) [x+c|x<-ab,c<-cs])

main::IO()
main=do
  (x:y:z:k:[])<-return.map read.words=<<getLine
  as<-return.map read.words=<<getLine
  bs<-return.map read.words=<<getLine
  cs<-return.map read.words=<<getLine
  forM_ (take k (solver as bs cs)) (\ v ->print v )