#include <bits/stdc++.h>
using namespace std;
void solve(int n, int c) {
  if (n == 3) {
    cout << c << " " << c << " " << 3 * c << endl;
    return;
  }
  if (n == 2) {
    cout << c << " " << 2 * c;
    return;
  }
  if (n == 1) {
    cout << c;
    return;
  }
  int m = n / 2;
  for (int j = 1; j <= n - m; j++) {
    cout << c << " ";
  }
  solve(m, c * 2);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  int n;
  cin >> n;
  solve(n, 1);
  return 0;
}
