Given b
0, b
1, ..., b
n-1, find two permutations {a
i}, {c
i} of 0..n-1 such that a
i+b
i=c
i (mod n) for every i.
First line, number of test cases, T.
Following are 2*T. For every two lines, the first line is n and the second line contains n integers.
Sum of all n <= 10
5.
0<=b
i<n
It's guaranteed that there exists a solution.
Test data is generated by randomly choosing two permutations and subtracting one from the other.
2*T lines. Every line contains n integers. For every two lines, the first line represents {a
i} and the second line represents {c
i}.
If there are multiple solutions, output any one of them.