package com.mingrisoft;
import java.util.Scanner;
public class MyApp{
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
while(scan.hasNextInt())
{
int p=scan.nextInt();
int i,x,m,n;
n=0;
for ( x = 2; x <= 100; x++) {
m = x;
for ( i = 2; i <= m; i++) {
if (x % i == 0)
break;
}
if(i==m){
System.out.print(x+"\t"+" ");
n++;
}
else{
continue;
}
if(n%10==0){
System.out.println();
}
if(n==p)
{
break;
}
}
}
}
}
import java.util.Scanner;
public class MyApp{
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
while(scan.hasNextInt())
{
int p=scan.nextInt();
int i,x,m,n;
n=0;
for ( x = 2; x <= 100; x++) {
m = x;
for ( i = 2; i <= m; i++) {
if (x % i == 0)
break;
}
if(i==m){
System.out.print(x+"\t"+" ");
n++;
}
else{
continue;
}
if(n%10==0){
System.out.println();
}
if(n==p)
{
break;
}
}
}
}
}