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