import java.util.*;

fun Eratos(n:Int):List<Int>{
    var h=BooleanArray(n,{true})
    h[0]=false
    h[1]=false
    for(i in h.indices){
        if(h[i]==true){
            var j=i+i
            while(j<n){
                h[j]=false
                j+=i
            }
        }
    }
    return h.indices.filter{i->h[i]==true}
}

fun ANSWER():List<Int>{
    val era=Eratos(100000);
    return era.filter{it->it%5==1}
}

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextLong()
    val ans = ANSWER()
    for(i in ans.indices){
        if(i>=n){
            break
        }
        print("${ans[i]} ")
    }
}