#include <bits/stdc++.h>
using namespace std;
const int maxn = 500005;
const int maxm = 100;
const int inf = 2147483647;
const double eps = 1e-9;
const long long INF = 9223372036854775807ll;
long long qpow(long long a, long long b, long long c) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % c;
    a = a * a % c;
    b >>= 1;
  }
  return ans;
}
int prim[maxn], flag[maxn], tot, to[maxn], cnt[maxn];
void euler(int n) {
  for (register int i = (2); i < (n + 1); ++i) {
    if (!flag[i]) prim[tot++] = i, to[i] = i;
    for (register int j = 0; j < tot && prim[j] * i <= n; ++j) {
      flag[prim[j] * i] = 1;
      to[i * prim[j]] = prim[j];
      if (i % prim[j] == 0) break;
    }
  }
}
int main() {
  int n;
  scanf("%d", &n);
  euler(n);
  for (register int i = (2); i < (n + 1); ++i) cnt[i] = cnt[i - 1] + !flag[i];
  for (register int i = (0); i < (tot); ++i) printf("1 ");
  int res = n - 1 - tot;
  for (register int i = (2); i < (n + 1); ++i) {
    if (!res) break;
    int ct = min(min(cnt[to[i]], cnt[n / i]), res);
    res -= ct;
    for (register int j = (0); j < (ct); ++j) printf("%d ", i);
  }
  printf("\n");
}
