#include <bits/stdc++.h>
using namespace std;
const int N = 2000010, mod = 1e9 + 7;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
void solve(int n) {
  if (n == 1)
    cout << "1";
  else if (n == 2)
    cout << "1 2";
  else {
    int c = n, cc = 0;
    for (int i = 1; i <= 1e6; i *= 2) {
      int cnt = n - n / (i * 2) - cc;
      cc += cnt;
      while (cnt-- && c != 1) {
        cout << i << ' ';
        c--;
      }
      if (c == 1) {
        cout << n / i * i << ' ';
        break;
      }
    }
  }
}
int main() {
  int n = read();
  solve(n);
  return 0;
}
