#include <bits/stdc++.h>
using namespace std;
const long long N = 5e5 + 9, mod = 1e9 + 7, inf = 1e18;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  if (n == 3) {
    cout << "1 1 3\n";
    exit(0);
  }
  if (n & 1) cout << 1 << " ", n--;
  long long rm = n;
  for (int i = 0; (1 << i) <= n; i++) {
    if (rm == 2) {
      cout << (1 << i) << " " << (1 << (i + 1)) << "\n";
      exit(0);
    }
    for (int j = (1 << i); j <= n; j += (1 << (i + 1))) {
      if (rm == 2) {
        cout << (1 << (i)) << " " << j << "\n";
        exit(0);
      }
      cout << (1 << i) << " ";
      rm--;
    }
  }
}
