#CCBCHBAHAI0000179. Quà tặng (Presents)
Quà tặng (Presents)
Presents
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem
There are friends numbered through . Friend gives a present to friend . The sequence is a permutation of , so every friend receives exactly one present.
For every friend , determine who gave a present to .
Equivalently, construct the inverse permutation satisfying
Input
- The first line contains .
- The second line contains the permutation .
Output
Print .
Subtasks
Subtask 1 (20 points): ; is a permutation of .
Subtask 2 (30 points): ; is a permutation of .
Subtask 3 (50 points): ; is a permutation of .
Example
Input
4
2 3 4 1
Output
4 1 2 3
Explanation
Since , the givers for friends 1,2,3,4 are 4,1,2,3.