import java.lang.Math.sqrt

fun primes(upper:Int):List<Int>{
    val isPrime = Array(upper + 1){true}
    val res = mutableListOf<Int>()
    for (i in 2 .. sqrt(upper.toDouble()).toInt()){
        if (isPrime[i]){
            for (j in 2 * i .. upper step i){
                isPrime[j] = false
            }
        }
    }
    for (i in 6 .. upper step 5 ){
        if (isPrime[i]){
            res.add(i)
        }
    }
    return res
}
fun main(args:Array<String>):Unit{
    val prime = primes(55555)
    val n = readLine()!!.toInt()
    println(prime.subList(0, n).joinToString(" "))
}