- Time limit: 1.00 s
- Memory limit: 512 MB
You are given two permutations and such that in every position. Create a third permutation such that and in every position.
Input
The first line has an integer : the permutation size.
The second line has integers .
The third line has integers .
Output
Print integers . You can print any valid solution. If there are no solutions, print IMPOSSIBLE
.
Constraints
Example
Input:
5 1 3 2 5 4 4 1 3 2 5
Output:
3 2 5 4 1