#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000005;
vector<int> ans;
bool vis[MAXN];
int main() {
  int N;
  scanf("%d", &N);
  int cur = 2;
  while (1) {
    if (cur * 2 > N) break;
    for (int i = 1; i <= N; i++) {
      if (i % cur != 0 && vis[i] == 0) {
        ans.push_back(cur / 2);
        vis[i] = 1;
      }
    }
    cur *= 2;
  }
  int last = 0;
  for (int i = 1; i <= N; i++) {
    if (vis[i] == 0) {
      last = i;
      ans.push_back(cur / 2);
      vis[i] = 1;
    }
  }
  if (last != 0) {
    ans.pop_back();
    ans.push_back(last);
  }
  for (auto a : ans) cout << a << " ";
  return 0;
}
