Professor GukiZ likes programming contests. He especially likes to rate his students on the contests he prepares. Now, he has decided to prepare a new contest. 

In total, *n* students will attend, and before the start, every one of them has some positive integer rating. Students are indexed from 1 to *n*. Let's denote the rating of *i*-th student as *a*<sub class="lower-index">*i*</sub>. After the contest ends, every student will end up with some positive integer position. GukiZ expects that his students will take places according to their ratings. 

He thinks that each student will take place equal to <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/8525cafdf358474b435e5d3d9562e6bc3bbbe6c5.png" style="max-width: 100.0%;max-height: 100.0%;"/>. In particular, if student *A* has rating strictly lower then student *B*, *A* will get the strictly better position than *B*, and if two students have equal ratings, they will share the same position. 

GukiZ would like you to reconstruct the results by following his expectations. Help him and determine the position after the end of the contest for each of his students if everything goes as expected.
The first line contains integer *n* (1 ≤ *n* ≤ 2000), number of GukiZ's students. 

The second line contains *n* numbers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ... *a*<sub class="lower-index">*n*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 2000) where *a*<sub class="lower-index">*i*</sub> is the rating of *i*-th student (1 ≤ *i* ≤ *n*).
nab = [int(x) for x in input().split()]
n = nab[0]
arr = [int(x) for x in input().split()]
brr = sorted(arr,key =lambda x:x)
temp =[0]*2001
cnt =0
while brr:
	cnt+=1
	x = brr.pop()
	if temp[x]==0:
		temp[x] =cnt
			
result =[]

for e in arr:
	result.append(temp[e])
# print(result)	
print(" ".join([str(x) for x in result]))	