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

solve :: Int -> [Int]
solve n =
  take n $ filter ((==1).(`mod`10)) $ primes

primes :: [Int]
primes = 2:[i |i<-[3..], isPrime i ]

isPrime i =
  and[i`mod`p/=0 | p <- takeWhile (<=u) primes]
  where
    u = floor(sqrt(fromIntegral i))