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