import java.util.Scanner

object Main {
  def solve(sc: => Scanner): Unit = {
    val A = Array.fill(sc.nextInt)(sc.nextDouble)
    for (i <- 0 until A.size) {
      println(A.map(x => if (A(i) < x) (0) else (if (A(i) == x) (1) else (3))).sum - 1)
    }
  }

  def main(args: Array[String]): Unit = {
    val sc: Scanner = new Scanner(System.in)

    solve(sc)
  }
}