Time limit: 1s
Memory limit: 256MB
Input:
Output:
A permutation of length is an array = [ ], which contains every integer from to (inclusive) and, moreover, each number appears exactly once.
gives you the following problem:
Given for each () can you find the permutation ?
Input
The first line contains a single integer () – the length of the permutation
The second line contains integers ().
Output
Print the hidden permutation
Example 1
stdin
3
-1 -1
stdout
3 2 1
Example 2
stdin
5
-3 1 -2 3
stdout
5 2 3 1 4