l=[] try: while 1:l.append(input()) except: for i in l:print sorted(l)[::-1].index(i)+1