main = do
  n <- readLn
  putStrLn . unwords . map show $ solve n

solve :: Int -> [Int]
solve n = take n qs where
  qs = filter (\p -> p `mod` 5 == 1) $ primes 55555

primes :: Int -> [Int]
primes n = sieve [2 .. n] where
  sieve (x:xs) = x:ys where
    ys = if x ^ 2 > n then xs else sieve $ filter (\y -> y `mod` x /= 0) xs
