#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
using vb = vector<bool>;
using vi = vector<int>;
using vl = vector<long long>;
using vvb = vector<vector<bool>>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<long long>>;
using vpii = vector<pair<int, int>>;
using mii = map<int, int>;
template <typename... ArgTypes>
void print(ArgTypes... args);
template <typename... ArgTypes>
void input(ArgTypes &...args);
template <>
void print() {}
template <>
void input() {}
template <typename T, typename... ArgTypes>
void print(T t, ArgTypes... args) {
  cout << t;
  print(args...);
}
template <typename T, typename... ArgTypes>
void input(T &t, ArgTypes &...args) {
  cin >> t;
  input(args...);
}
void traverse(int n, int mul) {
  if (n == 0) return;
  int a = n - n / 2, b = n - n / 3;
  int x = 2, y = 3;
  if (a >= b) {
    swap(a, b);
    swap(x, y);
  }
  for (int i = 1; i <= a; i++) cout << mul << " ";
  int remaining = n / x;
  traverse(remaining, mul * x);
}
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  traverse(n, 1);
}
