
object Main extends App {

  import scala.io.StdIn._
  val n = readLine.trim.toInt
  val points = Array.tabulate(n){_ ⇒ 0}
  for (_ ← 0 until (n * (n - 1) / 2)) {
    val Array(a, b, c, d) = readLine.trim.split(' ').map(_.toInt)
    if (c > d){
      points(a - 1) += 3
    }else if (c < d){
      points(b - 1) += 3
    }else {
      points(a - 1) += 1
      points(b - 1) += 1
    }
  }
  val scores = Array.tabulate(n * 3 + 1){_ ⇒ 0}
  points.foreach(scores(_) += 1)
  for (i ← (1 to 3 * n).reverse){
    scores(i - 1) += scores(i)
  }
  points.foreach{score ⇒
    println(scores(score + 1) + 1)
  }
}

