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