#include <bits/stdc++.h>
using namespace std;
void sequence(long int n, int m) {
  if (n == 1) {
    cout << m;
    return;
  } else if (n == 3) {
    cout << m << " " << m << " " << 3 * m;
    return;
  }
  for (int i = 1; i <= (n + 1) / 2; i++) {
    cout << m << " ";
  }
  sequence(n / 2, 2 * m);
}
int main() {
  long int n;
  cin >> n;
  sequence(n, 1);
}
