import java.util.Scanner

import scala.collection.mutable
import scala.util.control.Breaks

object MathAlgo {

  def Primes(size: Int): Array[Int] = {
    var primes = new Array[Int](0)
    val flag = Array.fill[Boolean](size)(true)
    val limit = Math.sqrt(size).toInt

    (2 until limit).foreach(i => {
      if (flag(i)) {
        primes = primes :+ i
        (i until size by i).foreach(j => {
          flag(j) = false
        })
      }
    })

    (limit until size).foreach(i => {
      if (flag(i)) {
        primes = primes :+ i
      }
    })

    primes
  }
}

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

    val N = sc.nextInt
    val P = MathAlgo.Primes(55556)
    var ans: Array[Int] = new Array[Int](0)

    P.foreach(p => {
      if (p % 5 == 1) {
        ans = ans :+ p
      }
    })

    print(ans.slice(0,N).mkString(" "))
  }
}