#include <bits/stdc++.h>
using namespace std;
int dir8[2][8] = {{1, -1, 0, 0, 1, -1, 1, -1}, {0, 0, 1, -1, 1, -1, -1, 1}};
int dir4[2][4] = {{1, -1, 0, 0}, {0, 0, 1, -1}};
int m, n, row, col;
void print(int a, int b) {
  for (int i = 0; i < b; i++) printf("%d ", a);
}
void solve(int test) {
  scanf("%d", &n);
  if (n == 1)
    printf("1\n");
  else if (n == 2)
    printf("1 2\n");
  else {
    int first, l;
    int s = 1;
    int j = n;
    while (n != 0) {
      first = n / 2;
      if (n % 2 != 0) first++;
      l = n - first;
      if (l == 0) {
        int i = j / (s / 2);
        i = i * (s / 2);
        printf("%d", i);
      } else
        print(s, first);
      s = s * 2;
      n = l;
    }
    printf("\n");
  }
}
void test() {
  int t;
  t = 1;
  for (int test = 1; test <= t; test++) {
    solve(test);
  }
}
int main() {
  test();
  return 0;
}
