#include <bits/stdc++.h>
using namespace std; 
typedef long long ll; 
typedef vector <long long> vll;
typedef vector <pair<ll,ll>> vpll; 
#define f(i,a,b) for(ll i=a ; i<b ; i++)

ll a[140000]; 
void arr(){
    a[1]=1; 
    f(i,1,17){
        ll l=(1L<<i),r=(1L<<(i+1)); 
        f(j,l,r) a[j]=i+1; 
    }
}
int main(){
    ll n; cin >> n; 
    arr();
    f(i,1,n+1) cout << a[i] << " "; 
    return 0; 
}
#include <iostream>
#include <vector>
#include <utility>
#include<algorithm>
#include <string>
#include <map>
#include <cmath>
#include <random>
#include <tuple>
#define ll long long
using namespace std;



int main(){
  ll b;
  cin >> b;
  ll n = 100000;
  vector<int> pri = {2};
  for(int i = 3;i < 100000;i ++){
    int j = 0;
    bool jud = true;
    while(pri[j]*pri[j] <= i){
      if(i % pri[j] == 0){
        jud = false;
        break;
      }
      j ++;
    }
    if(jud){
      pri.push_back(i);
    }
  }
  vector<int> ans(n,0);
  ans[1-1] = 1;
  for(int i:pri){
    ans[i-1] = 2;
  }
  for(int i = 1;i <= n;i ++){
    if(ans[i-1] == 0){
      int p = i;
      int j = 0;
      int nu = 0;
      int need = 0;
      while(p != 1){
        if(p % pri[j] == 0){
          p = p/pri[j];
          need ++;
        }else{
          j ++;
        }
      }
      ans[i-1] = need+1;
    }
  }
  
  for(int i = 0;i < b;i ++){
    cout << ans[i] << endl;
  }
  
  
  
  return 0;
}