#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000002;
const int logN = (int)log2(MAXN) + 1;
const int MOD = 1000000007;
const long long MODL = 1000000007;
const int INF = 1000000007;
const long long INFL = 1000000007ll * 1000000007ll;
const long double PI = acos(-1);
const int HashPrime = 31;
inline void No() { puts("No"); }
inline void Yes() { puts("Yes"); }
bool prime(int n) {
  if (n == 1) {
    return false;
  }
  if (n == 2) {
    return true;
  }
  if (n % 2 == 0) {
    return false;
  }
  for (int i = 3; i * i <= n; i += 2) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
int n, m;
char c[1002][1002];
void precalc() {}
void solve() {
  int n;
  cin >> n;
  int t = 1;
  while (n) {
    if (n == 3) {
      cout << t << " " << t << " " << 3 * t;
      break;
    }
    for (int i = 0; i < n - (n / 2); ++i) {
      cout << t << " ";
    }
    t <<= 1;
    n /= 2;
  }
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.precision(9);
  precalc();
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
