import Data.Array.IO
import Control.Applicative
import Data.List
import Control.Monad

getLineN :: Int -> IO [String]
getLineN n = replicateM n getLine

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

main = do
    n <- getNum
    putStrLn.format $ makePrimes n (eratosthenes 55555)
    
makePrimes n xs = 2:take (n-1) (delete 2 xs)

format [] = []
format (x:xs) = show x ++ " " ++ format xs


eratosthenes :: Integer -> [Integer]
eratosthenes n =
    let primes = [2..n]
        recursion ms = 
          case ms of
            [] -> []
            (m:_) -> m : recursion [x | x <- ms, x `mod` m /= 0]
    in  recursion primes