#include <bits/stdc++.h>
using namespace std;
void print(int n, int base) {
  if (n == 1) cout << base << "\n", exit(0);
  if (n == 2) cout << base << " " << base * n << "\n", exit(0);
  if (n == 3) cout << base << " " << base << " " << base * n << "\n", exit(0);
  for (int i = 0; i < ((n + 1) >> 1); ++i) cout << base << " ";
  print(n / 2, base << 1);
}
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(nullptr);
  cin.tie(nullptr);
  int n;
  cin >> n;
  print(n, 1);
  cerr << "Esc Time: " << clock() << " ms\n";
  return 0;
}
