import Data.List
import Data.Array
main=do
 [x,y,z,k]<-map read.words<$>getLine
 a<-array (1,x).zip [1..x].sortBy (\a b->compare b a).map read.words<$>getLine
 b<-array (1,y).zip [1..y].sortBy (\a b->compare b a).map read.words<$>getLine
 c<-array (1,z).zip [1..z].sortBy (\a b->compare b a).map read.words<$>getLine
 mapM_ print (take k (sortBy (\a b->compare b a) [a!h+b!i+c!j|h<-[1..x],i<-[1..(quot k h)],j<-[1..(quot k (h*i))],i<=y,j<=z]))