Cheffina challanges chef to rearrange the given array as arr[i] > arr[i+1] < arr[i+2] > arr[i+3].. and so on…, i.e. also arr[i] < arr[i+2] and arr[i+1] < arr[i+3] and arr[i] < arr[i+3] so on.. Chef accepts the challenge, chef starts coding but his code is not compiling help him to write new code.

-----Input:-----
- First-line will contain $T$, the number of test cases. Then the test cases follow. 
- Each test case contains two lines of input, First $N$ as the size of the array. 
- N space-separated distinct integers.

-----Output:-----
For each test case, output in a single line answer given to the Chefffina.

-----Constraints-----
- $1 \leq T \leq 10$
- $1 \leq N \leq 10^5$
- $1 \leq arr[i] \leq 10^5$

-----Sample Input:-----
2
4
4 1 6 3
5
4 5 1 6 3

-----Sample Output:-----
3 1 6 4
3 1 5 4 6

Source: codechef | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	i = 1
	while i < n:
		(a[i - 1], a[i]) = (a[i], a[i - 1])
		i += 2
	print(*a)


for _ in range(int(input())):
	n = int(input())
	arr = [int(i) for i in input().split()]
	arr = sorted(arr)
	for i in range(n):
		if i % 2 == 0:
			if i == n - 1:
				print(arr[i], '', end='')
			else:
				print(arr[i + 1], '', end='')
		else:
			print(arr[i - 1], '', end='')
	print()


from sys import stdin, stdout
input = stdin.readline
from collections import defaultdict as dd
import math

def geti():
	return list(map(int, input().strip().split()))

def getl():
	return list(map(int, input().strip().split()))

def gets():
	return input()

def geta():
	return int(input())

def print_s(s):
	stdout.write(s + '\n')

def solve():
	for _ in range(geta()):
		n = geta()
		a = getl()
		a.sort()
		for i in range(1, n, 2):
			(a[i], a[i - 1]) = (a[i - 1], a[i])
		print(*a)

def __starting_point():
	solve()
__starting_point()


def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def lcm(x, y):
	return x * y // gcd(x, y)

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True
abc = 'abcdefghijklmnopqrstuvwxyz'
pi = 3.141592653589793
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	ans = []
	for i in range(1, n + 1, 2):
		try:
			ans.append(arr[i])
		except:
			pass
		try:
			ans.append(arr[i - 1])
		except:
			pass
	print(*ans)