#include <bits/stdc++.h>
using namespace std;
int n, i, j, ans, a[500010], v[500010];
int main() {
  scanf("%d", &n);
  ans = n;
  for (i = 1; i <= n; i++) a[i] = n;
  for (i = n; i > 1; i--) {
    for (j = i * 2; j <= n; j += i)
      if (!v[j]) ans--, v[j] = 1;
    a[ans] = min(a[ans], i - 1);
  }
  for (i = n - 1; i; i--) a[i] = min(a[i], a[i + 1]);
  for (i = 2; i <= n; i++) printf("%d ", a[i]);
}
