import scala.io.Source

object Main extends App {
  val primes = sieve(Stream.from(2))

  def sieve(st: Stream[Int]): Stream[Int] = {
    val x = st.head
    x #:: sieve(st.tail.filter(_ % x != 0))
  }

  val lines: Iterator[String] = Source.stdin.getLines()
  val n = lines.next.toInt
  println(primes.filter(_ % 5 == 1).take(n).mkString(" "))
}
