#include <stdio.h>
long a[51000];
int main()
{
	long n,i,k;
	freopen("heapsort.in","r",stdin);
	freopen("heapsort.out","w",stdout);

	scanf("%ld",&n);
	a[1]=1;
	i=1;
	while(i<n)
	{
		a[++i]=1;
		k=i-1;
		while(k>1)
		{
			a[k]=a[k/2];
			k/=2;
		}
		a[1]=i;
	}
	for (i=1;i<=n;i++)
		printf("%ld ",a[i]);
	return 0;
}