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