#include <iostream>
#include <vector>
using namespace std;

void rec(vector<vector<int>> &L, int l, int r, int t){
  int m = (l+r)/2;
  for(int i = l; i < m; ++i){
    for(int j = m; j < r; ++j){
      L[i][j] = t;
    }
  }
  if(l+1 < m) rec(L,l,m,t+1);
  if(m+1 < r) rec(L,m,r,t+1);
}

int main(){
  int N;
  cin >> N;
  vector<vector<int>> L(N,vector<int>(N,0));
  rec(L,0,N,1);
  for(int i = 0; i < N; ++i){
    for(int j = i+1; j < N; ++j){
      cout << L[i][j];
      if(j < N-1) cout << " ";
      else cout << endl;
    }
  }
}
