#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << "1" << endl;
  } else if (n == 2) {
    cout << "1"
         << " "
         << "2" << endl;
  } else if (n == 3) {
    cout << "1"
         << " "
         << "1"
         << " "
         << "3" << endl;
  } else {
    vector<int> vec;
    int a = 1;
    while (n > 3) {
      for (int i = 0; i < (n + 1) / 2; i++) {
        vec.push_back(a);
      }
      n = n / 2;
      a = a * 2;
    }
    if (n == 3) {
      vec.push_back(a);
      vec.push_back(a);
      vec.push_back(3 * a);
    } else if (n == 2) {
      vec.push_back(a);
      vec.push_back(2 * a);
    }
    for (int i = 0; i < vec.size(); i++) {
      cout << vec[i] << " ";
    }
  }
}
