fun main(args: Array<String>) {
    abc096d()
}

fun abc096d() {
    val n = readLine()!!.toInt()

    val primes = genPrime(55555)

    val answer = primes.filter { it % 5 == 1L }.take(n).joinToString(" ")

    println(answer)
}

private fun genPrime(max: Long): LongArray {
    val sqrt = Math.ceil(Math.sqrt(max.toDouble())).toLong()
    val primes = mutableListOf<Long>()

    var target = (2..max).toList()

    while (target.isNotEmpty() && target.first() <= sqrt) {
        val prime = target.first()
        primes.add(prime)
        target = target.filterNot { it % prime == 0L }
    }

    primes.addAll(target)

    return primes.toLongArray()
}
