#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int main(void) {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  int even;
  int odd;
  int p = 1;
  int l = n;
  while (p <= n) {
    if (l == 3) {
      cout << p << " " << p << " " << p * 3;
      break;
    } else {
      odd = l - l / 2;
      l /= 2;
      for (int i = 0; i <= odd - 1; i++) cout << p << " ";
      p *= 2;
    }
  }
  return 0;
}
