#include <bits/stdc++.h>
using namespace std;
int vis[500005], an[500005], n, cnt[500005], ans;
int main() {
  scanf("%d", &n);
  int N = n;
  for (int i = n / 2; i; i--) {
    vector<int> a;
    for (int j = i + i; j <= n; j += i) {
      if (!vis[j]) a.push_back(j);
    }
    for (int j = a.size() - 1; j >= 0; j--) {
      an[N--] = i;
      vis[a[j]] = 1;
    }
  }
  for (int i = 2; i <= n; i++) printf("%d ", an[i]);
  return 0;
}
