Given b0, b1, ..., bn-1, find two permutations {ai}, {ci} of 0..n-1 such that ai+bi=ci (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 <= 105. 0<=bi<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 {ai} and the second line represents {ci}. If there are multiple solutions, output any one of them.