#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> r(n);
  r[0] = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = 2 * i; j <= n; j += i) {
      if (r[i - 1] + 1 > r[j - 1]) r[j - 1] = r[i - 1] + 1;
    }
  }
  for (auto e : r) cout << e << ' ';
  cout << endl;
}
#include <bits/stdc++.h>

#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int main()
{
	cin.tie(0);
	ios_base::sync_with_stdio(0);

	int n; cin>>n;
	cout << 1 << " \n"[n == 1];
	int num = 1;
	int dex = 2;
	int ind = 2;
	int i = 0;
	while (num < n)
	{
		if (i == dex)
		{
			i = 0;
			dex *= 2;
			ind++;
		}
		cout << ind << " \n"[num == n - 1];	
		i++;
		num++;
	}
	cout << "\n";
}
