#include <iostream>
using namespace std;
int function(unsigned n){
if(n==1)
return 1;
if(n%2)
return 1 + 2*function(n-2);
return 1 + function(n-1);
}
int main() {
unsigned x,i=1;
long v[61];
cin>>x;
while(function(i)<=x){
v[i] = function(i);
i++;
}
while(i>1){
cout<<v[--i]<<" ";
}
return 0;
}