
-- Kaisetsu

main = do
    n <- read <$> getLine
    let fullList = [x | x<-primes 55555, x`mod`5==1]
    let answer = printList $ take n fullList
    putStrLn answer

printList :: [Int] -> String
printList []     = []
printList (x:xs) = show x++" "++(printList xs)

primes :: Int -> [Int]
primes 1 = []
primes n = 2:[x| x<-[3,5..n], and [mod x k /=0 | k<-primes (sqrtI x) ]]

sqrtI :: Integral a => a -> Int
sqrtI = floor.sqrt.fromIntegral