#include <bits/stdc++.h>
using namespace std;
long long int seq[1000005];
long long int ans[1000005];
long long int ptr = 0;
void solve(long long int n, long long int mul) {
  long long int i;
  if (n == 1) {
    ans[ptr] = mul;
    ptr++;
    return;
  }
  if (n == 2) {
    ans[ptr] = mul;
    ptr++;
    ans[ptr] = mul * 2;
    ptr++;
    return;
  }
  if (n == 3) {
    ans[ptr] = mul;
    ptr++;
    ans[ptr] = mul;
    ptr++;
    ans[ptr] = mul * 3;
    ptr++;
    return;
  }
  for (i = 0; i < n; i++) {
    if (seq[i] & 1) {
      ans[ptr] = mul;
      ptr++;
    }
  }
  for (i = 0; i < n / 2; i++) seq[i] = seq[2 * i + 1] / 2;
  solve(n / 2, 2 * mul);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  long long int i;
  cin >> n;
  for (i = 0; i < n; i++) seq[i] = i + 1;
  solve(n, 1);
  for (i = 0; i < n; i++) cout << ans[i] << " ";
  return (0);
}
