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