#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int q = 1;
  while (q--) {
    int n, b;
    cin >> n;
    b = 1;
    while (n > 3) {
      for (int i = 0; i < (n + 1) / 2; i++) cout << b << " ";
      b *= 2;
      n /= 2;
    }
    if (n == 3) cout << b << " " << b << " " << b * 3;
    if (n == 2) cout << b << " " << 2 * b;
    if (n == 1) cout << b;
  }
}
