#include <fstream>

using namespace std;

ifstream fin( "heapsort.in" );
ofstream fout( "heapsort.out" );

const int MAX = 50000;
int A[MAX], N;

int main()
{
   fin >> N;
   int i, t;
   A[0] = 1;
   for( i = 1; i<N; ++i )
   {
      A[i] = 1;
      t = i-1;
      for( ; t>0; t = (t-1)/2 )
         A[t] = A[(t-1)/2];
      A[0] = i+1;
   }
   for( i = 0; i<N; ++i )
      fout << A[i] << ' ';
   return 0;
}
