#include <bits/stdc++.h>
using namespace std;
int n, now = 1;
void solve(int m) {
  if (m == 1) {
    printf("%d\n", now);
    return;
  }
  if (m == 2) {
    printf("%d %d\n", now, 2 * now);
    return;
  }
  if (m == 3) {
    printf("%d %d %d\n", now, now, 3 * now);
    return;
  }
  for (int i = 0; i < (m + 1) / 2; i++) printf("%d ", now);
  now <<= 1;
  m >>= 1;
  solve(m);
  return;
}
int main() {
  int i, j;
  scanf("%d", &n);
  solve(n);
}
