//h
#include <stdio.h>
const int MAX = 65536;
int n;

void Swap(int &x, int &y) {
	int temp=x;
	x = y;
	y = temp;
}

class CHeap {
	public:
	int heapsize,heap[MAX];
	CHeap() {
		heapsize = 1;
		heap[1] = 1;
	}
	void siftup() {
		int i;
		for (i=heapsize-1; i>1; i/=2)
			Swap(heap[i],heap[i/2]);
	}
	void add() {
		heap[heapsize] = heapsize+1;
		heap[heapsize+1] = 1;
		heapsize++;
		siftup();
	}
} h;

int main() {
	int i;
	freopen("heapsort.in","rt",stdin);
	freopen("heapsort.out","wt",stdout);
	scanf("%d",&n);
	for (i=2; i<=n; i++)
		h.add();
	for (i=1; i<=n; i++) {
		printf("%d",h.heap[i]);
		if (i==n)
			printf("\n");
		else
			printf(" ");
	}	
	return 0;
}