#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int ans = 1;
  while (n) {
    if (n == 3) {
      printf("%d %d %d\n", ans, ans, ans * 3);
      break;
    }
    for (int i = 1; i <= (n + 1) / 2; i++) printf("%d ", ans);
    n /= 2;
    ans *= 2;
  }
  return 0;
}
