#include <bits/stdc++.h>
using namespace std;
struct transformations : vector<int> {
  void transform(int n, int g = 1) {
    switch (n) {
      case 1:
        push_back(g);
        return;
      case 2:
        push_back(g), push_back(2 * g);
        return;
      case 3:
        push_back(g), push_back(g), push_back(3 * g);
        return;
      default:
        for (int q = (n + 1) / 2, i = 0; i < q; ++i) push_back(g);
    }
    transform(n / 2, 2 * g);
  }
  transformations(int n) { transform(n); }
};
int main() {
  int n;
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cin >> n;
  for (auto x : transformations(n)) cout << x << ' ';
}
