#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>

#include <algorithm>
using namespace std;

int n,m;
int H[50001];
int nH;


int main()
{
  freopen("heapsort.in","r",stdin);
  freopen("heapsort.out","w",stdout);

  int i,j,k;

  scanf("%d",&n);
  H[1]=1;
  for(i=2;i<=n;i++)
  {
      H[i]=1;
      H[i-1]=i;
      k=i-1;
      while(k>1)
      {
          j=k/2;
          if(H[j]>H[k]) {break;}
          else
          {
             int t=H[j];
             H[j]=H[k];
             H[k]=t;
             k=j;
          }
      }
  }
  for(i=1;i<n;i++)
   printf("%d ",H[i]);
  printf("%d\n",H[i]);
  return 0;
}