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
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 