#include <bits/stdc++.h>
template <class C, class E>
inline bool contains(const C& container, const E& element) {
  return container.find(element) != container.end();
}
template <class T>
inline void checkmin(T& a, T b) {
  if (b < a) a = b;
}
template <class T>
inline void checkmax(T& a, T b) {
  if (b > a) a = b;
}
using namespace std;
int n;
int rem;
void Solve(int n, int curDiv) {
  cout << curDiv << " ";
  if (n == 1) return;
  if (n == 2) {
    cout << curDiv * 2 << " ";
    return;
  }
  if (n == 3) {
    cout << curDiv << " " << curDiv * 3 << " ";
    return;
  }
  for (int i = (0), _b = (((n + 1) / 2 - 1) - 1); i <= _b; i++)
    cout << curDiv << " ";
  Solve(n - (n + 1) / 2, curDiv * 2);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << std::setprecision(15);
  cout << std::fixed;
  cin >> n;
  Solve(n, 1);
  return 0;
}
