#include <bits/stdc++.h>
const long long mod = 1e9 + 7;
const long long inf = 0x3f3f3f3f;
using namespace std;
int n, a[1000005], ans[1000005], c = 0;
void fun(int n, int t) {
  if (n == 1) {
    ans[c++] = t;
    return;
  }
  if (n == 2) {
    ans[c++] = t, ans[c++] = t * 2;
    return;
  }
  if (n == 3) {
    ans[c++] = t, ans[c++] = t;
    ans[c++] = t * 3;
    return;
  }
  for (int i = 0; i < n; i++)
    if ((a[i] / t) & 1) ans[c++] = t;
  for (int i = 0; i < n / 2; i++) a[i] = a[2 * i + 1];
  fun(n / 2, t * 2);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) a[i] = i + 1;
  fun(n, 1);
  for (int i = 0; i < c; i++) printf("%d ", ans[i]);
  return 0;
}
