-- editorial #2
import Data.List
import Data.Array.IO

main = do
    [x,y,z,k] <- (map read . words) <$> getLine :: IO [Int]
    as <- readSortedLs x >>= getAssocs
    bs <- readSortedLs y >>= getAssocs
    cs <- readSortedLs z >>= getAssocs
    let sumList = [a'+b'+c' | (a,a')<-as, (b,b')<-bs, (c,c')<-cs, a*b*c<=k]
    sumArr <- newListArray (1,length sumList) sumList
    resArr <- mergeSort sumArr
    res <- take k <$> getElems resArr
    mapM_ print res

readSortedLs :: Int -> IO (IOArray Int Int)
readSortedLs len = do
    ls <- map read . words <$> getLine
    newListArray (1,len) ls >>= mergeSort


mergeSort :: IOArray Int Int -> IO (IOArray Int Int)
mergeSort arr = getBounds arr >>= (\x->mergeSort' x arr)
    where
        mergeSort' :: (Int,Int) -> IOArray Int Int -> IO (IOArray Int Int)
        mergeSort' (l,r) arr = if l==r
            then return arr
            else do
                let m = (l+r) `div` 2
                mergeSort' (l,m) arr
                mergeSort' (m+1,r) arr
                subLeft <- subarr arr (l,m)
                subRight <- subarr arr (m+1,r)
                writeSub arr l $ merge subLeft subRight

merge :: [Int] -> [Int] -> [Int]
merge as [] = as
merge [] bs = bs
merge al@(a:as) bl@(b:bs) = if a > b then a:merge as bl else b:merge al bs

subarr :: IOArray Int Int -> (Int,Int) -> IO [Int]
subarr arr (l,r) = subarr' arr l
    where
        subarr' :: IOArray Int Int -> Int -> IO [Int]
        subarr' arr n = do
            xs <- if n == r then return [] else subarr' arr (n+1)
            (:xs) <$> readArray arr n

writeSub :: IOArray Int Int -> Int -> [Int] -> IO (IOArray Int Int)
writeSub arr l []     = return arr
writeSub arr l (x:xs) = do
    writeArray arr l x
    writeSub arr (l+1) xs
