#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long mod1 = 998244353;
const long long inf = 1e9;
long long n;
long long find_log() {
  long long lo = 0, hi = 20;
  while (lo <= hi) {
    long long mid = (lo + hi) / 2;
    if ((1 << mid) <= n)
      lo = mid + 1;
    else
      hi = mid - 1;
  }
  return hi;
}
void solve() {
  cin >> n;
  long long log = find_log();
  if (log <= 1) {
    for (long long i = (0); i < (n - 1); i++) cout << 1 << " ";
    cout << n;
    return;
  }
  long long counted = 0;
  vector<long long> ans;
  while (log >= 0) {
    long long gcd = (1 << log);
    long long num = n / gcd;
    for (long long i = (0); i < (num - counted); i++) ans.push_back(gcd);
    counted += num - counted;
    log--;
  }
  reverse(ans.begin(), ans.end());
  ans[n - 1] = (n / ans[n - 2]) * ans[n - 2];
  for (long long x : ans) cout << x << " ";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
