-- editorial #2
import Data.List

main = do
    [x,y,z,k] <- (map read . words) <$> getLine :: IO [Int]
    as <- zip [1..] <$> readSortedLs
    bs <- zip [1..] <$> readSortedLs
    cs <- zip [1..] <$> readSortedLs
    let sumList = [a'+b'+c' | (a,a')<-as, (b,b')<-bs, (c,c')<-cs, a*b*c<=k]
    mapM_ print $ take k $ sortBy (flip compare) sumList

readSortedLs :: IO [Int]
readSortedLs = sortBy (flip compare) . map read . words <$> getLine
