#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
pair<int, int> operator+(const pair<int, int>& x, const pair<int, int>& y) {
  return make_pair(x.first + y.first, x.second + y.second);
}
pair<int, int> operator-(const pair<int, int>& x, const pair<int, int>& y) {
  return make_pair(x.first - y.first, x.second - y.second);
}
inline long long read() {
  char ch = getchar();
  long long x = 0, f = 0;
  while (ch < '0' || ch > '9') f |= ch == '-', ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return f ? -x : x;
}
int T;
const int maxn = 2e5 + 7;
int n;
void solve() {
  cin >> n;
  vector<vector<int> > d(n + 1);
  for (int i = (1); i < (n + 1); ++i)
    for (int j = i; j <= n; j += i) d[j].push_back(i);
  d[1].push_back(1);
  vector<int> d2(n + 1);
  for (int i = (1); i < (n + 1); ++i) d2[i] = d[i][d[i].size() - 2];
  vector<int> p(n);
  iota(p.begin(), p.end(), 1);
  auto cmp = [&](int a, int b) { return d2[a] < d2[b]; };
  sort(p.begin(), p.end(), cmp);
  int ans = 1;
  vector<int> occ(n + 1, 0);
  for (int i = (0); i < (n); ++i) {
    int val = d2[p[i]];
    if (occ[val] == 1)
      ans = max(ans, val);
    else
      occ[val] = 1;
    if (i != 0) cout << val << " ";
  }
  return;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  T = 1;
  for (int tc = (1); tc < (T + 1); ++tc) {
    solve();
  }
  return 0;
}
