Welcome to the PAM problem, which stands for Permutation Array Maximized.
Given an array of integers and an integer , find any permutation of the array such that the count of indices (1 \le i \le n - 1) for which b_i + b_{i+1} = k is maximized.
The first line contains a single integer (1 \le t \le 10^4) — the number of test cases.
The first line of each test case contains two integers (2 \le n \le 2 \cdot 10^5;\ 1 \le k \le 2 \cdot 10^9) — the length of array and the target sum .
The second line of each test case contains integers a_1, a_2, \ldots, a_n (1 \le a_1, a_2, \ldots, a_n \le 10^9) — the array .
It is guaranteed that \sum n \le 4 \cdot 10^5 over all test cases.
For each test case, output any permutation of array such that it maximizes the count of indices that contribute to .
Example 1
In the first test case, no matter which permutation we choose, it will always be [1, 1, 1], so it is optimal.
In the second test case:
a_1 + a_2 = 7
a_2 + a_3 = 9
a_3 + a_4 = 7
a_4 + a_5 = 7
Which is the maximum possible count of indices.
Subtask ( points): n = 2
Subtask ( points): a_1 = a_2 = a_3 = \ldots = a_n
Subtask ( points): 1 \le n \le 8
Subtask ( points): 1 \le a_i \le 1000
Subtask ( points): 1 \le a_i \le 10^6
Subtask ( points): No additional constraints.