import java.util.Scanner

import scala.collection.mutable

object Main {
  def main(args: Array[String]): Unit = println(solve(new Scanner(System.in)))

  def solve(in: String): String = solve(new Scanner(in))

  def solve(sc: Scanner): String = {
    val N = sc.nextInt

    var primes = mutable.MutableList(2)
    for (i <- 3 to 55555 by 2) {
      if (!primes.map(i % _).contains(0)) {
        primes += i
        if (primes.count(_ % 10 == 1) == N) {
          return primes.filter(_ % 10 == 1).mkString(" ")
        }
      }
    }
    throw new Exception()
  }
}
