Олимпиадный тренинг

Задача 27019. Reverse permutation


Задача

Темы:

Given a permutation π required to find π-1.

Input data

The first line  of the input contains the number 0 < N <= 20000 – the number of elements in the permutation π. The second line contains the permutation π.

Output

Output π-1

 

Enter Output
3
2 3 1
3 1 2

Parsing:
We enter N and start an array from 1 to N. Now we start reading this permutation - it is not necessary to store it, so it would be reasonable to enter each element into the same variable. Entering the i-th element, we put its ordinal number (i) in the array cell with a number equal to this number, i.e. for each element of a given permutation, we save its place in this permutation. Now we output the resulting array.