Time limit 1000/1000/1000/1000 ms. Memory limit 65000/65000/65000/65000 Kb.
Problem description
A permutation is any sequence of numbers from 1 to N, σ=(σ1, σ2, ..., σn), where σi ≠ σj and 1 ≤ σi ≤ N, σ(i) = σi.
Product of permutations is calculated according to the next rule:
σ * π = (π(σ(1)), π(σ(2)), ..., π(σ(n))) = (π(σ1), π(σ2), ..., π(σn)).
Let permutation ε = (1, 2, ..., n). Then reverse permutation σ-1 to permutation σ is such a permutation that σ * σ-1 = ε.
Your task is to find a reverse permutation to given one.
Input
There is a single integer N on the first line (0 < N <= 20000) and N integers on the second line of input.
Output
Write reverse permutation.
Example
| stdin |
stdout |
3
2 3 1 |
3 1 2 |
Для отправки решений необходимо выполнить вход.
|