#include <bits/stdc++.h>
using namespace std;
const int maxx = 1e6 + 6;
int n, nr, a[maxx], v[maxx];
bool ok;
void solve(int n, int k) {
  if (n == 1) {
    a[nr++] = k;
    return;
  }
  if (n == 2) {
    a[nr++] = k;
    a[nr++] = 2 * k;
    return;
  }
  if (n == 3) {
    a[nr++] = k;
    a[nr++] = k;
    a[nr++] = 3 * k;
    return;
  }
  for (int i = 0; i < n; i++)
    if (v[i] & 1) a[nr++] = k;
  for (int i = 0; i < n / 2; i++) v[i] = v[2 * i + 1] / 2;
  solve(n / 2, 2 * k);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) v[i] = i + 1;
  solve(n, 1);
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  return 0;
}
