Inverse Inversion - 2#5450

Inverse Inversion - 2

2 seconds
122.174 megabytes
Hard

Inversion table for a permutation A = (a_1, a_2, \ldots, a_n) of the numbers \{1, 2, \ldots, N\} is defined as an array X = (x_i)_{1 \leq i \leq N}. At the -th position of this array, x_i represents the count of elements greater than that appear to the left of in the permutation. In other words, x_i is the number of indices j' such that j' < j and a_{j'} > a_j = i.

For instance, the inversion table for the permutation (2, 5, 1, 3, 4) is (2, 0, 1, 1, 0), and for the permutation (6, 1, 3, 7, 5, 4, 2), it is (1, 5, 1, 3, 2, 0, 0).

The inverse permutation A^{-1} of a permutation is a permutation where the -th position in A^{-1} indicates the position in where the element equal to is located.

For example, for the permutation (2, 5, 1, 3, 4), the inverse permutation is (3, 1, 4, 5, 2) because is at the third position, is at the first, is at the fourth, is at the fifth, and is at the second. Similarly, for the permutation (2, 7, 3, 6, 5, 1, 4), the inverse is (6, 1, 3, 7, 5, 4, 2).

Your task is to compute the inversion table of the inverse permutation A^{-1}, given the inversion table of permutation .

Input

The input consists of exactly numbers, separated by spaces and newline characters, which define the inversion table of the permutation . The number ranges from to .

Output

Output integers, separated by spaces, representing the inversion table for the inverse permutation.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading