#include <bits/stdc++.h>
using namespace std;
int maxi[1000010] = {}, cnt[1000010] = {};
bool marked[1000010] = {false};
void solve(int n, int p) {
  if (!n) return;
  int T = cnt[n];
  for (int i = 0; i < n - T; i++) cout << p << " ";
  solve(T, maxi[n] * p);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  maxi[1] = cnt[1] = 0;
  maxi[0] = cnt[0] = 0;
  for (int i = 2; i < 1000010; i++) {
    if (cnt[i] < cnt[i - 1])
      cnt[i] = cnt[i - 1], maxi[i] = maxi[i - 1];
    else if (cnt[i] == cnt[i - 1])
      maxi[i] = max(maxi[i], maxi[i - 1]);
    if (marked[i]) continue;
    int j;
    for (j = 1; j * i < 1000010; j++) {
      marked[j * i] = true;
      if (cnt[j * i] <= j) maxi[j * i] = i, cnt[j * i] = j;
    }
  }
  int n;
  cin >> n;
  solve(n, 1);
  return 0;
}
