primes :: [Int]
primes = filterPrime [2 ..]
  where filterPrime (p:xs) =
          p : filterPrime [ x | x <- xs, x `mod` p /= 0 ]

main :: IO ()
main = do
  n <- read <$> getLine :: IO Int
  putStrLn $ unwords $ map show $ take n $ filter (\x -> x `mod` 5 == 1) primes
