#include "bits/stdc++.h"
#pragma region header
using i32 = int;
using i64 = long long int;
using u32 = unsigned int;
using u64 = unsigned long long int;
using isize = ptrdiff_t;
using usize = size_t;

constexpr size_t operator"" _uz(unsigned long long v) { return size_t(v); }

inline u64 popcount(const u64 v) {
#ifdef _MSC_VER
  return u64(__popcnt64(v));
#else
  return u64(__builtin_popcount(v));
#endif
}

class range {
  struct range_iterator {
    usize itr;
    constexpr range_iterator(const usize pos) noexcept : itr(pos) {}
    constexpr void operator++() noexcept { ++itr; }
    constexpr bool operator!=(const range_iterator& other) const noexcept {
      return itr != other.itr;
    }
    constexpr usize operator*() const noexcept { return itr; }
  };
  const range_iterator first, last;

 public:
  constexpr range(const usize first_, const usize last_) noexcept
      : first(first_), last(last_) {}
  constexpr range_iterator begin() const noexcept { return first; }
  constexpr range_iterator end() const noexcept { return last; }
};

template <class F>
class rec_lambda {
  F f;

 public:
  constexpr rec_lambda(F&& f_) : f(std::forward<F>(f_)) {}
  template <class... Args>
  constexpr auto operator()(Args&&... args) const {
    return f(*this, std::forward<Args>(args)...);
  }
};

namespace cs_helper {
void zip_sort_renumber([[maybe_unused]] std::vector<usize>& order) {}
template <class T, class... Args>
void zip_sort_renumber(std::vector<usize>& order, std::vector<T>& head,
                       Args&... args) {
  usize n = order.size();
  assert(n == head.size());
  std::vector<T> sorted_head(n);
  for (usize i = 0; i < n; ++i) sorted_head[i] = head[order[i]];
  head = std::move(sorted_head);
  zip_sort_renumber(order, args...);
}
}  // namespace cs_helper

template <class T, class... Args>
std::vector<usize> zip_sort(std::vector<T>& head, Args&... args) {
  usize n = head.size();
  std::vector<std::pair<T, usize>> tmp(n);
  for (usize i = 0; i < n; ++i) tmp[i] = std::make_pair(head[i], i);
  std::sort(tmp.begin(), tmp.end());
  std::vector<usize> order(n);
  for (usize i = 0; i < n; ++i) order[i] = tmp[i].second;
  cs_helper::zip_sort_renumber(order, head, args...);
  return order;
}
#pragma endregion

void main_() {
  /*u64 K, N, M;
  std::cin >> K >> N >> M;
  std::vector<u64> A(K);
  for (auto& el : A) std::cin >> el;
  if ((N > M and N % M == 0) or (N < M and M % N == 0)) {
    std::cout << 0 << '\n';
    return;
  }

  long double ok = 10000000000.0, ng = 0.;
  while (ok - ng > 0.000001) {
    const auto mid = (ok + ng) / 2;
    i64 left = 0, right = 0;
    for (usize i : range(0, K)) {
      
    }
  }*/

  usize N;
  std::cin >> N;
  
  std::vector<u64> T1, T2, T3, T4;
  for (u64 i : range(1, 10001)) {
    if (i % 2 == 0 and i % 3 == 0 and i % 5 == 0)
      T4.emplace_back(i);
    else if (i % 2 == 0 and i % 3 == 0)
      T1.emplace_back(i);
    else if (i % 2 == 0 and i % 5 == 0)
      T2.emplace_back(i);
    else if (i % 3 == 0 and i % 5 == 0)
      T3.emplace_back(i);
  }

  std::vector<u64> ans;
  ans.emplace_back(T1[0]);
  ans.emplace_back(T2[0]);
  ans.emplace_back(T3[0]);
  for (usize i : range(1, T1.size())) ans.emplace_back(T1[i]);
  for (usize i : range(1, T2.size())) ans.emplace_back(T2[i]);
  for (usize i : range(1, T3.size())) ans.emplace_back(T3[i]);
  for (usize i : range(1, T4.size())) ans.emplace_back(T4[i]);

  for (usize i : range(0, N)) {
    std::cout << ans[i] << ' ';
  }
  // AtCoder Regular Contest 118
}

int main() { main_(); }
#include <bits/stdc++.h>
using namespace std;
int last[120000],a[120000];
int main(){
	int n;
	cin>>n;
	for(int i=1;i<=n;i++){
		for(int j=2*i;j<=n;j+=i){
			last[j]=i;
		}
	}
	for(int i=1;i<=n;i++) {
		a[i]=a[last[i]]+1;
		printf("%d ",a[i]);
	}
	return 0;
}