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