100 atcoder#ABC217C. [ABC217C] Inverse of Permutation
[ABC217C] Inverse of Permutation
Score : points
Problem Statement
We will call a sequence of length where each of occurs once as a permutation of length . Given a permutation of length , , print a permutation of length , , that satisfies the following condition.
- For every , the -th element of is .
It can be proved that there exists a unique that satisfies the condition.
Constraints
- is a permutation of length (defined in Problem Statement).
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the sequence in one line, with spaces in between.
3
2 3 1
3 1 2
The permutation satisfies the condition, as follows.
- For , we have .
- For , we have .
- For , we have .
3
1 2 3
1 2 3
If for every , we will have .
5
5 3 2 4 1
5 3 2 4 1