#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ff first
#define ss second
#define SZ(x) (long long)x.size()
#define endl '\n'
#define FAST                                                                   \
  ios_base::sync_with_stdio(false);                                            \
  cin.tie(0);                                                                  \
  cout.tie(0)
#define tc                                                                     \
  int tc;                                                                      \
  cin >> tc;                                                                   \
  while (tc--)
#define REP(i, a, b) for (int i = a; i < b; i++)
#define REPO(i, b, a) for (int i = b - 1; i >= a; i--)
#define REPI(i, a, b) for (int i = a; i <= b; i++)
#define MOD 1000000007

int32_t main() {
  FAST;
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  freopen("output.txt", "w", stderr);
#endif
  int n;
  cin >> n;
  set<int> s;
  REPI(i, 1, sqrt(n)) {
    if (n % i == 0) {
      s.insert(i);
      s.insert(n / i);
    }
  }
  for (auto i : s)
    cout << i << endl;
  return 0;
}
/*
* @Author: wilson_t
* @Date:   2021-03-23 00:40:16
* @Last Modified by:   wilson_t
* @Last Modified time: 2021-03-23 01:28:27
*/
#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pil = pair<int, long long>;
using pll = pair<long long, long long>;
using pli = pair<long long, int>;

inline void speedio() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
}

inline void readline(string& s) {
    getline(cin >> ws, s);
}

inline void read(vector<int>& v) {
    int number;
    while (cin >> number) {
        v.push_back(number);
        if (cin.get() == '\n')
            break;
    }
}

void solve() {
    int N;
    cin >> N;
    //1->2->3->4->5...
    //1 2 3 4 5 6 7 8 9 10
    //1 2 2 3 3 3 3 4 4 4 
    int now = 0;
    for(int i = 1; i <= N; ++i) {
        if((i & (i - 1)) == 0) ++now;
        cout << now << " ";
    }
    cout << "\n";
}

int main() {
    speedio();
    // freopen("in.txt", "r", stdin);
    solve();
    return 0;
}

