Hide

Problem M
Klósettröð

Languages en is
/problems/klosettrod/file/statement/en/img-0001.jpg
Image from flickr.com
Forritunarkeppni Framhaldsskólanna started today and now there is a lunch break. All $n$ contestants have been solving problems like mad and have not paid attention to needing to use the bathroom. Now in the lunch break everyone is rushing for the bathrooms. We can denote how badly each contestant needs to use the restrooms with a single integer $a_i$. The higher it is, the more they need to use the bathroom.

Input

The input consists of two lines. The first line contains a single integer $1 \le n \le 1\, 000$. The second line contains $n$ integers $1 \le a_i \le n$. It will hold for all $i \neq j$ that $a_i \neq a_j$. Worded differently, the values are unique.

Output

Print the order of the contestants such that they are ordered by how badly they need to use the bathroom. The person who needs to use the bathroom the most should be at the front.

Scoring

Group

Points

Constraints

1

100

No further constraints

Sample Input 1 Sample Output 1
3
1 2 3
3 2 1 
Sample Input 2 Sample Output 2
5
1 3 2 5 4
4 5 2 3 1 

Please log in to submit a solution to this problem

Log in