fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val prime = eratos(55555)

    val ans = prime.filter { it%5==1 }.take(n)
    println(ans.joinToString(" "))
}

fun eratos(n:Int):List<Int>{
    val rtn = Math.sqrt(n.toDouble()).toInt()
    val prime = IntArray(n+1){ it }
    prime[0] = 0
    prime[1] = 0
    for(i in 2..rtn){
        if(prime[i]!=0){
            for(j in 2*i..n step i){
                prime[j]=0
            }
        }
    }
    return prime.filter { it!=0 }
}