#include <bits/stdc++.h>
using namespace std;
int n;
void calc(int n, int cur) {
  if (n <= 0) return;
  for (int i = 1; i <= (n + 1) / 2; ++i) {
    cout << cur << " ";
  }
  if (n == 3) {
    calc(n / 2, cur * 3);
  } else {
    calc(n / 2, cur * 2);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  calc(n, 1);
  return 0;
}
