#include <bits/stdc++.h>
using namespace std;
int n;
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  cerr << "HELLO WORLD :)\n";
  cin >> n;
  if (n <= 3) switch (n) {
      case 1:
        return cout << "1\n", false;
      case 2:
        return cout << "1 2\n", false;
        break;
      default:
        return cout << "1 1 3\n", false;
        break;
    }
  int x = n, t = 0;
  while (x) {
    if (x <= 3) {
      switch (x) {
        case 1:
          cout << (1 << t) << ' ';
        case 2:
          cout << (1 << t) << ' ' << (1 << (t + 1)) << ' ';
          break;
        default:
          cout << (1 << t) << ' ' << (1 << t) << ' '
               << (1 << t) + (1 << (t + 1)) << ' ';
          break;
      }
      x = 0;
    }
    for (int i = 0; i < (x + 1) / 2; i++) cout << (1 << t) << ' ';
    t++;
    x >>= 1;
  }
  return cout << "\n", false;
}
