import scala.math._

object Main {
  val sc = new java.util.Scanner(System.in)
  def main(args: Array[String]) {
    val n = sc.nextInt()
    val p = new Array[Int](n+1)
    for(_ <- 1 to n*(n-1)/2) {
      val a, b, c, d = sc.nextInt()
      if(c < d) {
        p(b) += 3
      }
      if(c > d) {
        p(a) += 3
      }
      if(c == d) {
        p(a) += 1
        p(b) += 1
      }
    }
    for(i <- 1 to n) {
      println(p.filter(a => a > p(i)).size + 1)
    }
  }
}