import sys input = sys.stdin.readline N = int(input()) axis = list(map(int, input().split())) temp = sorted(list(set(axis))) hash = {temp[i]: i for i in range(len(temp))} sys.stdout.write(' '.join(map(str,[hash[axis[i]] for i in range(N)])))