#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int c;
  while (b) {
    c = a % b;
    a = b;
    b = c;
  }
  return a;
}
int main() {
  int n;
  cin >> n;
  int base = 1;
  while (n >= 4) {
    for (int i = 1; i <= (n + 1) / 2; i++) {
      cout << base << " ";
    }
    n /= 2;
    base *= 2;
  }
  if (n == 3) {
    cout << base << " " << base << " " << base * 3 << endl;
  } else if (n == 2) {
    cout << base << " " << base * 2 << endl;
  } else
    cout << base << endl;
  return 0;
}
