#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 5;
long long f[N] = {1};
vector<long long> ans;
void doit(long long n, long long mul) {
  if (n == 1) {
    ans.push_back(1 * mul);
    return;
  }
  if (n == 2) {
    ans.push_back(1 * mul);
    ans.push_back(2 * mul);
    return;
  }
  if (n == 3) {
    ans.push_back(1 * mul);
    ans.push_back(1 * mul);
    ans.push_back(3 * mul);
    return;
  }
  for (long long i = 1; i <= ((n + 1) / 2); i++) ans.push_back(mul * 1);
  doit(n / 2, mul * 2);
}
void solve(long long tt) {
  long long n, i;
  cin >> n;
  doit(n, 1);
  sort(ans.begin(), ans.end());
  for (auto x : ans) cout << x << " ";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long T = 1, i;
  while (T--) solve(T);
  return 0;
}
