#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
vector<int> dvs[N];
int nxt[N];
int prv[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i)
    for (int j = i; j <= n; j += i) dvs[j].emplace_back(i);
  vector<int> invalid(n + 1, 0);
  auto add = [&](int x, int a, int b) {
    nxt[a] = prv[b] = x;
    prv[x] = a;
    nxt[x] = b;
  };
  auto del = [&](int x) {
    nxt[prv[x]] = nxt[x];
    prv[nxt[x]] = prv[x];
  };
  invalid[1] = 1e9;
  int ans = 1;
  nxt[0] = 2;
  prv[2] = 0;
  nxt[2] = n + 1;
  prv[n + 1] = 2;
  for (int i = 3; i <= n; ++i) add(i, i - 1, n + 1);
  for (int i = 2; i <= n; ++i) {
    while (nxt[0] > n) {
      ++ans;
      int p = 0;
      for (int j = ans; j <= n; j += ans) {
        invalid[j]--;
        if (invalid[j] == 0) add(j, p, n + 1), p = j;
      }
    }
    cout << ans << " ";
    int x = nxt[0];
    for (int d : dvs[x])
      if (d > ans && invalid[d] == 0)
        for (int j = d; j <= n; j += d) {
          invalid[j]++;
          if (invalid[j] == 1) del(j);
        }
    invalid[x] = 1e9;
  }
}
