#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
int Num[maxn];
vector<int> Ans;
void Solve(int N, int Factor) {
  if (N == 1) {
    Ans.push_back(Factor);
    return;
  } else if (N == 2) {
    Ans.push_back(Factor);
    Ans.push_back(Factor * 2);
    return;
  } else if (N == 3) {
    Ans.push_back(Factor);
    Ans.push_back(Factor);
    Ans.push_back(Factor * 3);
    return;
  }
  for (int i = 1; i <= N; ++i) {
    if (Num[i] & 1) {
      Ans.push_back(Factor);
    }
  }
  for (int i = 1; i <= N / 2; ++i) {
    Num[i] = Num[2 * i] / 2;
  }
  Solve(N / 2, Factor * 2);
}
int main(int argc, char *argv[]) {
  int N;
  scanf("%d", &N);
  if (N <= 3) {
    for (int i = 0; i < N - 1; ++i) {
      printf("%d ", 1);
    }
    printf("%d\n", N);
    return 0;
  }
  for (int i = 1; i <= N; ++i) {
    Num[i] = i;
  }
  Solve(N, 1);
  for (auto i : Ans) {
    printf("%d ", i);
  }
  return 0;
}
