public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int t = s.nextInt();
int a[]=new int[t];
for (int i = 0; i < t; i++) {
a[i] = s.nextInt();
}
boolean p[] = new boolean[1000];
for (int i = 0; i < p.length; i++) {
p[i] = true;
}
ArrayList<Integer> list = new ArrayList<Integer>();
for (int i = 2; i * i < 1000; i++) {
if (p[i] == true) {
for (int j = i * i; j < 1000; j += i) {
p[j] = false;
}
}
}
for(int k =2;k<=1000;k++){
if(p[k]==true) {
list.add(k);
}
}
for(int i=0;i<t;i++)
{
System.out.println(list.get(i));
}
}