Under construction

Still being built. Things may change

Score

Interview

Time limit5sMemory limit1024 MB

Summary
Given n exam scores, output each student's rank in input order, where ties share the same rank.
Level

Easy3 of 10

Topics
Sorting, Array, Implementation
Solved
No attempts yet

Problem

An entrance examination was recently held in the Department of Informatics at JOI University. The exam is out of 100 points, and nn students took it. To decide the minimum passing score, JOI University decided to rank each student based on the exam results.

Given the scores of nn students, write a program that finds each student's rank. Note that multiple students may have the same score.

Input

The first line of the input contains the number of students nn (1≤n≤1000001 \le n \le 100000). The following nn lines give the students' scores. The (i+1)(i+1)-th line (1≤i≤n1 \le i \le n) contains the score sis_i (0≤si≤1000 \le s_i \le 100) of the student with examinee number ii.

Output

Output to standard output. The output consists of nn lines. On the ii-th line (1≤i≤n1 \le i \le n), output the rank of the student with examinee number ii.

Examples1

  1. Example 1

    Input
    6
    100
    90
    80
    90
    100
    65
    
    Expected output
    1
    3
    5
    3
    1
    6