#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int base = 1;
  if (n == 1) {
    cout << 1 << endl;
    return;
  }
  while (1) {
    int x = n / 2 + (n & 1);
    int y = n / 2;
    for (int i = 0; i < x; i++) cout << base << " ";
    if (y == 1) {
      if (x == 2)
        base = base * 3;
      else
        base = base * 2;
      cout << base << endl;
      break;
    }
    base *= 2;
    n = y;
  }
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  solve();
}
