import Data.List
main=do
 s<-words<$>getLine
 let [x,y,z,k] = map read s :: [a]->Integer
 xn<-map read.words<$>getLine
 yn<-map read.words<$>getLine
 zn<-map read.words<$>getLine
 let xp = ceiling$x*(sqrt$sqrt 3000/(x*y*z))
 let yp = ceiling$y*(sqrt$sqrt 3000/(x*y*z))
 let zp = ceiling$z*(sqrt$sqrt 3000/(x*y*z))
 let p = take k$reverse(sort [x+y+z|x<-take xp reverse(sort xn),y<-take yp reverse(sort yn),z<-take zp reverse(sort zn)])
 mapM_ print$if x*y*z<=3500 then take k$reverse(sort [x+y+z|x<-xn,y<-yn,z<-zn]) else p