#include <bits/stdc++.h>
using namespace std;
void print(int n, int base) {
  switch (n) {
    case 1:
      cout << base << "\n";
      break;
    case 2:
      cout << base << " " << base * n << "\n";
      break;
    case 3:
      cout << base << " " << base << " " << base * n << "\n";
      break;
    default:
      for (int i = 0; i < ((n + 1) >> 1); ++i) cout << base << " ";
      print(n / 2, base << 1);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(nullptr);
  cin.tie(nullptr);
  int n;
  cin >> n;
  print(n, 1);
  cerr << "Esc Time: " << clock() << " ms\n";
  return 0;
}
