AT_past202306_f 番号付け

Description

Given a sequence $ A $ of length $ N $ , find a sequence $ B $ that satisfies all of the following conditions. We can prove that this sequence $ B $ is unique. - $ B $ is a sequence obtained by rearranging $ (1,2,...,N) $ . - For all integer pairs $ (i,j)(i \neq j) $ , the following conditions are satisfied: - if $ A_i

Input Format

The input is given from Standard Input in the following format: > $ N $ $ A_1 $ $ A_2 $ $ \dots $ $ A_N $

Output Format

Print the answer in the following format. > $ B_1 $ $ B_2 $ $ \dots $ $ B_N $

Explanation/Hint

### Sample Explanation 1 When the sequence $ A=(2,3,4,4,4,4,3,3,2,1) $ , the sequence $ B=(2,4,7,8,9,10,5,6,3,1) $ . ### Constraints - All values in the input are integers. - $ 1 \le N \le 3 \times 10^5 $ - $ 1 \le A_i \le 10^9 $