def create(ans,l,r)
  if l == r
    return 0
  elsif r-l == 1
    ans[l][r] = 1
    return 1
  end

  mid = (l+r)/2
  level = 1 + [create(ans,l,mid), create(ans,mid+1,r)].max
  l.upto(r) do |i|
    (i+1).upto(r) do |j|
      ans[i][j] = level if ans[i][j] == -1
    end
  end
  return level
end

n = gets.to_i
ans = Array.new(n){[-1]*n}
create(ans,0,n-1)
(n-1).times do |i|
  puts ans[i][i+1,n-1].join(" ")
end