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