Inverse Inversion - 2
The inversion table for a permutation (A = (a_1, a_2, ..., a_n)) of the numbers ({1, 2, ..., N}) is defined as an array (X = (x_i)_1 i N). At the (i)-th position of this array, (x_i) represents the count of elements greater than (i) that appear to the left of (i) 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 (A) is a permutation where the (i)-th position in (A^-1) indicates the position in (A) where the element equal to (i) is located.
For example, for the permutation ((2, 5, 1, 3, 4)), the inverse permutation is ((3, 1, 4, 5, 2)) because (1) is at the third position, (2) is at the first, (3) is at the fourth, (4) is at the fifth, and (5) 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 the permutation (A).
Input
The input consists of exactly (N) numbers, separated by spaces and newline characters, which define the inversion table of the permutation (A). The number (N) ranges from (1) to (262144).
Output
Output (N) integers, separated by spaces, representing the inversion table for the inverse permutation.