import Data.List

main :: IO ()
main = do
  n <- readLn
  putStrLn . unwords . map show $ solve n

solve :: Int -> [Int]
solve n = take n (primes 55555)

primes :: Int -> [Int]
primes n = 2 : eratos [3,5 .. n]
  where
    eratos [] = []
    eratos (p:xs) = p : eratos (xs \\ [p,3*p..n])

