#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  if (n == 1) {
    cout << n;
    return 0;
  }
  long long c = 1, t, k = n;
  while (n > 0) {
    if (n % 2 == 1)
      t = (n + 1) / 2;
    else
      t = n / 2;
    n = n - t;
    while (t > 0) {
      if (n == 0)
        cout << (k / (c / 2)) * (c / 2) << " ";
      else
        cout << c << " ";
      t--;
    }
    c = c * 2;
  }
}
