#include <bits/stdc++.h>
using namespace std;
const long long N = 200005;
long long n;
void solve(long long a, long long b) {
  if (b == 1) {
    cout << a;
    exit(0);
  }
  if (b == 3) {
    cout << a << ' ' << a << ' ' << 3 * a;
    exit(0);
  }
  for (long long i = 1; i <= b; i += 2) {
    cout << a << ' ';
  }
  solve(2 * a, b / 2);
}
signed main() {
  cin >> n;
  solve(1, n);
}
