#include <bits/stdc++.h>
using namespace std;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  int n;
  cin >> n;
  
  vector<int> ans(n);
  for (int i = 1; i <= n; i++) {
    multiset<int> st;
    int now = i;
    for (int j = 2; j * j <= n; j++) {
      while (now % j == 0) {
        st.insert(j);
        now /= j;
      }
    }
    if (now >= 2) st.insert(now);
    ans.at(i - 1) = st.size() + 1;
  }
  
  for (int i = 0; i < n; i++) {
    if (i) cout << " ";
    cout << ans.at(i);
  }
  cout << '\n';
}
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

#include <bits/stdc++.h>

using namespace std;

#define DEBUG
#ifdef DEBUG
inline void debug_print() { cerr << endl; }
template <typename T1, typename... T2> void debug_print(const T1 a, const T2 &... b) { cerr << a << ' '; debug_print(b...); }
#define debug(...) cerr << __LINE__ << ": [" << #__VA_ARGS__ << "] = " , debug_print(__VA_ARGS__);
#else
#define debug(...) true
#endif

inline void print() { cout << '\n'; }
template <typename T1, typename... T2> void print(const T1 a, const T2 &... b) { cout << a << ' '; print(b...); }

template <typename T1, typename T2> ostream &operator<<(ostream &os, const pair<T1, T2> &p) { os << '(' << p.first << ", " << p.second << ')'; return os; }
template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) { for (auto e : v) os << e << ' '; return os; }
template <typename T> ostream &operator<<(ostream &os, const set<T> &v) { for (auto e : v) os << e << ' ';  return os; }
template <typename T> ostream &operator<<(ostream &os, const multiset<T> &v) { for (auto e : v) os << e << ' ';  return os; }
template <typename T1, typename T2> ostream &operator<<(ostream &os, const map<T1, T2> &mp) { for (auto e : mp) os << e << ' '; return os; }

template <typename T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } else return false; }
template <typename T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } else return false; }

const int INF = (1<<30)-1;
const long long LINF = 1LL<<60;
const double EPS = 1e-10;
const int MOD = 1000000007;
//const int MOD = 998244353;
const int dx[8] = {-1,0,1,0,1,-1,1,-1};
const int dy[8] = {0,1,0,-1,1,-1,-1,1};

//-------------------------- Libraries --------------------------//

//--------------------------- Solver ----------------------------//

void solve() {
    int N;
    cin >> N;

    if (N == 1) {
        cout << 1 << '\n';
        return;
    }

    vector<int> A(N+1, 1);

    for (int i = 2; i <= N; i++) {
        for (int j = i+i; j <= N; j+=i) {
            A[j] = A[i]+1;
        }
    }

    int ma = 0;
    for (int i = 0; i <= N; i++) {
        chmax(ma, A[i]);
    }
    A[1] = ma+1;

    for (int i = 1; i <= N; i++) {
        cout << A[i] << ' ';
    }
    cout << '\n';
}

int main() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(20);

    int t = 1;
    //cin >> t;
    while (t--) solve();

    return 0;
}
