#include<iostream>
#include<queue>
#include<cstdio>
using namespace std;
int n,t,num=0;
queue<int>a;
inline int read()
{
int x=0,f=1;char ch=getchar();
while(ch>'9'||ch<'0'){if(ch=='-')f=-1;ch=getchar();}
while(ch<='9'&&ch>='0'){x=x*10+ch-'0';ch=getchar();}
return x*f;
}
int main()
{
n=read();
for(int i=1;i<=n;i++) a.push(i);
while(num<n-1)
{
printf("%d ",a.front());
a.pop();
t=a.front();
a.pop();
a.push(t);
num++;
}
printf("%d\n",a.front());
return 0;
}