#include <bits/stdc++.h>
using namespace std;
int pow2[20];
int p;
void next(int a) {
  if (a == 0) {
    return;
  }
  if (a == 3) {
    cout << pow2[p] << " " << pow2[p] << " " << 3 * pow2[p];
    return;
  }
  for (int i = 0; i < (a + 1) / 2; i++) {
    cout << pow2[p] << " ";
  }
  p++;
  next(a / 2);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n;
  cin >> n;
  pow2[0] = 1;
  for (int i = 1; i <= 20; i++) {
    pow2[i] = 2 * pow2[i - 1];
  }
  p = 0;
  next(n);
  return 0;
}
