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