import java.io._
import java.util.StringTokenizer
import scala.util.control.Breaks.{breakable,break}
import scala.collection.mutable.{Map, Queue, PriorityQueue}

object Main extends App {
  val in = new InputReader(System.in)
  val pw = new PrintWriter(System.out)

  val N = in.next().toInt


  //
  val ans = Array.ofDim[Int](N+1, N+1)

  def calc(lst: List[Int], level: Int): Unit = {
    val l = lst.length
    if (l == 1)
      ()
    else {
      val al = lst.take(l/2)
      val bl = lst.slice(l/2, l)

      for (a <- al; b <- bl) {
        ans(a)(b) = level
      }
      calc(al, level + 1)
      calc(bl, level + 1)
    }
  }

  calc((1 to N).toList, 1)
  for (i <- 1 until N) {
    pw.println(ans(i).slice(i+1, N+1).mkString(" "))
  }
  pw.flush()
}


class InputReader(stream: InputStream) {
  private val reader = new BufferedReader(new InputStreamReader(stream))
  private var tokenizer: StringTokenizer = new StringTokenizer(reader.readLine())
  def next(): String = {
    while (!tokenizer.hasMoreTokens()) {
      tokenizer = new StringTokenizer(reader.readLine())
    }
    tokenizer.nextToken()
  }
}
