#include <bits/stdc++.h>   using namespace std;   vector<int> a;   void SieveOfEratosthenes(int n) {     bool prime[n + 1];     memset(prime, true, sizeof(prime));     for (int p = 2; p * p <= n; p++) {       if (prime[p] == true) {         for (int i = p * p; i <= n; i += p) prime[i] = false;       }     }     for (int p = 2; p <= n; p++)       if (prime[p]) a.push_back(p);   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     int n;     cin >> n;     SieveOfEratosthenes(100000);     for (int i = 2; i <= n; i++) {       for (int j = 0; j < a.size(); j++) {         if (i % a[j] == 0) {           cout << j + 1 <<    ;           break;         }       }     }     return 0;   }   