#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
vector<long long> v;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, id = 1;
  cin >> n;
  if (n == 1) {
    cout << "1" << endl;
    return 0;
  }
  while (1) {
    if (n % 2 == 1) {
      if (n == 3) {
        v.push_back(id);
        v.push_back(id);
        v.push_back(id * 3);
        break;
      }
      long long x = (n + 1) / 2;
      while (x--) v.push_back(id);
      n /= 2;
      id *= 2;
    } else {
      if (n == 2) {
        v.push_back(id);
        v.push_back(id * 2);
        break;
      }
      long long x = n / 2;
      while (x--) v.push_back(id);
      n /= 2;
      id *= 2;
    }
  }
  for (long long x : v) cout << x << " ";
  cout << endl;
}
