#include <bits/stdc++.h>
using namespace std;
pair<int, int> a;
int main(int argc, char *argv[]) {
  int n;
  cin >> n;
  if (n == 1) {
    cout << 1;
    return 0;
  }
  if (n == 2) {
    cout << 1 << " " << 2;
    return 0;
  }
  if (n == 3) {
    cout << 1 << " " << 1 << " " << 3;
    return 0;
  }
  int so = 1, ts = 2, ss = n, luu = 1;
  while (ss > 2) {
    int m = n / ts;
    m = ss - m;
    for (int i = 1; i <= m; i++) cout << luu << " ";
    ss = ss - m;
    if (ss == 1) {
      cout << ts;
      return 0;
    }
    if (ss == 2) {
      cout << ts << " " << ts * 2;
      return 0;
    }
    if (ss == 3) {
      cout << ts << " " << ts << " " << ts * 3;
      return 0;
    }
    luu = ts;
    ts = ts * 2;
  }
}
