import Control.Monad
import Text.Printf
import Control.Applicative
import Data.List as L

primes :: Integral a => [a]
primes = map fromIntegral primes'
  where
    primes' :: Integral a => [a]
    primes' = [2,3,5] ++ f 5 7 (drop 2 primes')

    f :: Integral a => a -> a -> [a] -> [a]
    f m s (p:ps) = [n | n <- ns, gcd m n == 1]
                   ++ f (m*p) (p^2) ps
      where -- Primes are either 6n+1 or 6n+5 form.
        ns = [x + y | x <- [s, s +6 .. p^2 -2], y <- [0, 4]]

primeList :: [Integer]
primeList = filter (\x -> x `mod` 5 == 1) $ takeWhile (< 55555) primes

main :: IO()
main = do
  [n] <- map read . words <$> getLine
  printf "%s" $ slv n

slv :: Int -> String
slv n = unwords $ map show ansPrimList
  where ansPrimList = take n primeList

isPrime :: Integer -> Bool
isPrime 2 = True
isPrime n
    | n < 2 = False
    | n `mod` 2 == 0 = False
    | otherwise = try n 3
    where
        try :: Integer -> Integer -> Bool
        try m i
            | m `mod` i == 0 = False
            | i^2 > m = True
            | otherwise =  try m (i+2)

comb :: Integer -> [a] -> [[a]]
comb 0 xs = [[]]
comb _ [] = []
comb n (x:xs) = [x:y | y <- comb (n-1) xs] ++ comb n xs