#include <bits/stdc++.h>
using namespace std;
bool prime[500500];
vector<int> vi;
int big[500500];
int main() {
  int n, i, j, k, x, y, ans, temp, curr, m;
  int tc;
  cin >> n;
  prime[0] = prime[1] = 1;
  for (i = 2; i <= n; i++) {
    if (!prime[i]) {
      vi.push_back(i);
      for (j = i * 2; j <= n; j += i) {
        prime[j] = 1;
        big[j] = i;
      }
    } else {
      for (j = i * 2; j <= n; j += i) {
        big[j] = i;
      }
    }
  }
  multiset<pair<int, int> > s;
  for (i = 2; i <= n; i++) {
    if (!prime[i]) continue;
    s.insert({big[i], i});
  }
  int maxi = n / 2;
  k = vi.size();
  int now;
  for (i = 2; i <= n; i++) {
    if (k > 0) {
      printf("1 ");
      k--;
    } else {
      now = (*s.begin()).first;
      s.erase(s.begin());
      printf("%d ", now);
    }
  }
  printf("\n");
  return 0;
}
