#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7fffffff;
int Min(int a, int b) { return a < b ? a : b; }
int Max(int a, int b) { return a > b ? a : b; }
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = (x << 3) + (x << 1) + c - '0', c = getchar();
  return x * f;
}
inline long long readl() {
  long long x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = (x << 3) + (x << 1) + c - '0', c = getchar();
  return x * f;
}
int n;
int now(int x, int f) {
  if (f == 1) return 0 * printf("%d ", x);
  if (f == 2) return 0 * printf("%d %d ", x, x << 1);
  if (f == 3) return 0 * printf("%d %d %d ", x, x, x * 3);
  for (int i = 1; i <= ((f + 1) >> 1); i++) printf("%d ", x);
  now(x << 1, f >> 1);
}
int main() {
  scanf("%d", &n);
  now(1, n);
}
