/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	static int max=100000;
	static boolean sieve[]=new boolean[max+1];
static 	void createsieve()
	{
		Arrays.fill(sieve,true);
		sieve[1]=false;
		sieve[0]=false;
		
		for(int i=2;i<=Math.sqrt(max);i++)
		{
			if(sieve[i])
			{
				for(int j=i*i;j<=max;j+=i)
				sieve[j]=false;
			}
		}
	}
	
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		createsieve();
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		List<Integer> li=new ArrayList<>();
		for(int i=1;i<=n;i++)
		{
			if(sieve[i])
			li.add(i);
		}
		
		System.out.println(li);
		
	}
}