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