#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p = 1;
  cin >> n;
  for (int i = n; i - 1; i >>= 1, p <<= 1)
    for (int j = 0; j < (i + 1) / 2; j++) cout << p << " ";
  p >>= (n != 1);
  cout << n / p * p;
}
