module Main where

import Data.Functor

main :: IO ()
main =  do
 { [n] <- getInts
 ; putStrLn $ (' ':) $ unwords $ map show $ takeWhile (n >=) [3,6 ..]
 }

getInts :: IO [Int]
getInts = map read . words <$> getLine