#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void amin(T &x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
inline void amax(T &x, U y) {
  if (x < y) x = y;
}
typedef long double ld;
typedef pair<long long, long long> pii;
void solve() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  if (n == 1)
    v[0] = 1;
  else if (n == 2) {
    v[0] = 1;
    v[1] = 2;
  } else if (n == 3) {
    v[0] = 1;
    v[1] = 1;
    v[2] = 3;
  } else {
    long long i = 0;
    long long temp = n;
    long long x = 1;
    while (temp) {
      long long coun = n / x - n / (2 * x);
      temp /= 2;
      if (n / x == 3) {
        v[i] = x;
        v[i + 1] = x;
        v[i + 2] = 3 * x;
        break;
      }
      for (long long j = 0; j < (long long)coun; j++) {
        v[i] = x;
        i++;
      }
      x <<= 1;
    }
  }
  for (long long ii : v) cout << ii << " ";
  cout << '\n';
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
