main = do
    n <- readLn :: IO Int
    putStrLn . unwords . map show . take n $ filter ((== 1) . (`mod` 5)) primes

primes = [2, 3, 5] ++ f 5 7 (drop 2 primes)
   where f m s (p:ps) = [n | n <- ns, gcd m n == 1] ++ f (m * p) (p * p) ps
            where ns = [x + y | x <- [s,s + 6 .. p * p - 2], y <- [0, 4]]