fun main(args: Array<String>) {
    val N = nextInt()
    var n = 0
    var p = 11
    var ans = IntArray(N)
    while (p <= 55555 && n < N) {
        if (isPrime(p)) {
            ans[n] = p
            n += 1
        }
        p += 5
    }
    println(ans.joinToString(" "))
}
fun isPrime(n: Int): Boolean {
    if (n == 1) return false
    for (k in 2 .. Math.sqrt(n.toDouble()).toInt()) {
        if (n % k == 0) return false
    }
    return true
}
fun next() = readLine()!!
fun nextInt() = next().toInt()
fun listOfString() = next().split(" ")
fun listOfIntg(d: Int = 0) = listOfString().map { it.toInt() + d }
