#include "bits/stdc++.h"
using namespace std;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    long long a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, m =0, n = 0, p = 0, q = 0, mod=998244353;
    string s;
    char moji;
    cin >> a;
    n=0;
    for(int i=1;n<a;i*=2)
    {
        m++;
        for(int j=0;j<i&&n+j<a;j++)
        {
            cout << m << ' ';
        }
        n+=i;
    }
    return 0;
}  
#include<iostream>
#include<vector>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N,1);
  int i,j;
  for(i=1;i<N;i++) {
    for(j=1;j*j<=i+1;j++) {
      if((i+1)%j == 0) {
        A[i] = max(A[i],max(A[j-1],A[(i+1)/j-1]));
      }
    }
    A[i]++;
  }
  for(i=0;i<N;i++)cout << A[i] << " ";
  cout << endl;
}