#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
int ans[500005], sum[500005], maxd[500005];
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  for (int i = 2; i <= n; i++) {
    for (int j = 2 * i; j <= n; j += i) {
      maxd[j] = i;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (maxd[i] == 0) {
      sum[1]++;
    } else {
      sum[maxd[i]]++;
    }
  }
  int j = 0, cur = 0;
  for (int i = 1; i <= n; i++) {
    cur += sum[i];
    while (j <= cur) {
      ans[j] = i;
      j++;
    }
  }
  for (int i = 2; i <= n; i++) {
    cout << ans[i] << " ";
  }
}
