#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  if (n == 1) {
    cout << 1 << endl;
    return 0;
  }
  long long p = 1;
  long long lft = n, tmp = n;
  while (1) {
    long long cur = (long long)pow(2, p);
    long long cnt = (long long)floor(tmp / cur);
    if (cnt == 1) {
      for (long long i = 0; i < lft - 1; i++)
        cout << (long long)pow(2, p - 1) << " ";
      cout << (long long)(pow(2, p - 1) * floor(tmp / pow(2, p - 1))) << endl;
      break;
    }
    lft = cnt;
    n = n - lft;
    for (long long i = 0; i < n; i++) cout << (long long)pow(2, p - 1) << " ";
    n = lft;
    p++;
  }
}
