fun main(args: Array<String>) {
    val tmp = BooleanArray(55556)
    val primes = mutableListOf<Int>()
    
    for (i in 2..55555) {
        if (!tmp[i]) {
            primes.add(i)
            for (j in i..55555 step i) {
                tmp[j] = true
            }
        }
    }
    
    val N = readInputLine().toInt()
    
    val ans = mutableListOf<Int>()
    
    var cnt = 0
    
    for (p in primes) {
        if (p % 5 == 1) {
            ans.add(p)
            cnt++
            if (cnt == N) {
                break
            }
        }
    }

    println(ans.joinToString(" "))
}

fun readInputLine(): String {
    return readLine()!!
}
