ADAUSORT  Ada and Unstable Sort
Ada the Ladybug had a lecture about algorithms. She learned that sorting can be done in O(NlogN) time. She also learned concept of stable sort. For those who missed the lecture, it means that as long as there are two equal elements in the array their mutual position won't change after the sort.
Ada wanted to come up with something new, so she proposed unstable sort. It is sort with following property: "As long as there are two equal elements in the array their mutual position will change after the sort".
As Ada has only theoretical knowledge about it, she has asked you to construct such algorithm for her.
Input
The first line of each testcase will contain an integer 1 ≤ N ≤ 10^{5}, the length of an array.
The next line will contain N integers 1 ≤ A_{i} ≤ 10^{5}, the elements of the array.
Output
For each testcase, print N numbers, the indexes of each element on which it was in original array. Indexes start with 1.
Example Input
4 1 2 3 4
Example Output
1 2 3 4
Example Input
3 3 2 1
Example Output
3 2 1
Example Input
6 6 6 6 6 6 6
Example Output
6 5 4 3 2 1
Example Input
5 5 5 2 2 3
Example Output
4 3 5 2 1
Example Input
6 1 2 1 2 1 2
Example Output
5 3 1 6 4 2
hide comments
nadstratosfer:
20210111 16:53:39
I don't understand the statement either. Ada asks us to implement a sorting algorithm, but output describes "original array", not defined anywhere but implying a reverse process. Moreover, the original array in last example appears to be [1, 2, 2, 1, 1, 2] which doesn't fit either concept. Morass, please clarify.


hulk_hh:
20200612 09:16:13
@aditya_rev stl sort works ! but you have to create your own comparator function 

saifu:
20190703 16:02:35
unable to understand the question


nitish676:
20180410 20:54:53
my solution id is 21502836


nitish676:
20180122 11:36:55
What will be the output for


morass:
20171120 13:03:44
@aditya_rev: Well it might depend on how you use it ;) 

aditya_rev:
20171118 19:38:14
Well.. sort stl wont works :) 
Added by:  Morass 
Date:  20171008 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All 
Resource:  Tunisian Collegiate Training Contest  Round #01 