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