
import Foundation

let n:Int = Int(readLine()!)!

var a:[Int]=[]

var k:Int=2

for i in 1...55{
    while k < 55555 {
        k += 1
        var b:Int=k
        for j in a{
            if k%j==0{
                b=0
            }
        }
        if b == k{
            a.append(k)
            break
        }
    }
}

var ans:[Int]=[]


for j in 1...a.count{
    if ans.count < n{
        if a[j-1] % 5 == 1{
            ans.append(a[j-1])
        }
    }
    else{
        break
    }
}
            
for i in 1...ans.count{
    print(ans[i-1])
}

              
