You are given an array $a$ of $2n$ distinct integers. You want to arrange the elements of the array in a circle such that no element is equal to the the arithmetic mean of its $2$ neighbours.

More formally, find an array $b$, such that:

$b$ is a permutation of $a$.

For every $i$ from $1$ to $2n$, $b_i \neq \frac{b_{i-1}+b_{i+1}}{2}$, where $b_0 = b_{2n}$ and $b_{2n+1} = b_1$.

It can be proved that under the constraints of this problem, such array $b$ always exists.


-----Input-----

The first line of input contains a single integer $t$ $(1 \leq t \leq 1000)$ — the number of testcases. The description of testcases follows.

The first line of each testcase contains a single integer $n$ $(1 \leq n \leq 25)$.

The second line of each testcase contains $2n$ integers $a_1, a_2, \ldots, a_{2n}$ $(1 \leq a_i \leq 10^9)$ — elements of the array.

Note that there is no limit to the sum of $n$ over all testcases.


-----Output-----

For each testcase, you should output $2n$ integers, $b_1, b_2, \ldots b_{2n}$, for which the conditions from the statement are satisfied.


-----Examples-----

Input
3
3
1 2 3 4 5 6
2
123 456 789 10
1
6 9
Output
3 1 4 2 5 6
123 10 456 789
9 6


-----Note-----

In the first testcase, array $[3, 1, 4, 2, 5, 6]$ works, as it's a permutation of $[1, 2, 3, 4, 5, 6]$, and $\frac{3+4}{2}\neq 1$, $\frac{1+2}{2}\neq 4$, $\frac{4+5}{2}\neq 2$, $\frac{2+6}{2}\neq 5$, $\frac{5+3}{2}\neq 6$, $\frac{6+1}{2}\neq 3$.

Source: codeforces | Difficulty: EASY
Tags: Sorting

Constructive algorithms


Solutions:
for _ in range(int(input())):
	n = int(input())
	nums = list(map(int, input().split()))
	nums.sort()
	l = []
	nl = len(nums)
	for i in range(n):
		l.append(nums[i])
		l.append(nums[nl - i - 1])
	print(' '.join(map(str, l)))


m = int(input())
l = []
for _ in range(m):
	t = int(input())
	a = sorted(list(map(int, input().split())))
	s = 0
	e = 1
	b = ''
	for i in range(2 * t):
		if i % 2 == 0:
			b += str(a[s]) + ' '
			s += 1
		else:
			b += str(a[-e]) + ' '
			e += 1
	l.append(b[:-1])
for i in l:
	print(i)


from sys import stdin, stdout
L = lambda : list(map(int, stdin.readline().strip().split()))
I = lambda : int(stdin.readline().strip())
T = I()
while T > 0:
	T = T - 1
	n = I()
	arrays = L()
	arrays.sort()
	now = 0
	for i in range(0, n):
		print(arrays[i], arrays[i + n], end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	ans = []
	for i in range(n):
		ans.append(arr[i + n])
		ans.append(arr[i])
	print(*ans)


t = int(input())
for test in range(t):
	N = int(input())
	lis = list(map(int, input().split()))
	a = []
	lis.sort()
	for i in range(N):
		a.append(lis[-(i + 1)])
		a.append(lis[i])
	print(*a)


def sol(A):
	A = sorted(A)
	ans = []
	i = 0
	j = len(A) - 1
	while i < j:
		ans.append(A[i])
		ans.append(A[j])
		i += 1
		j -= 1
	return ' '.join(map(str, ans))
x = int(input())
for _ in range(x):
	y = int(input())
	A = list(map(int, input().split()))
	print(sol(A))


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	n = 2 * n
	(l, r) = (0, n - 1)
	lis = []
	get = sorted(arr)
	while l < r:
		lis.append(get[l])
		lis.append(get[r])
		l += 1
		r -= 1
	print(*lis)


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	l = list(map(int, stdin.readline().split()))
	l.sort()
	shan = []
	i = 0
	j = 2 * n - 1
	while i < j:
		shan.append(l[i])
		shan.append(l[j])
		i += 1
		j -= 1
	print(*shan)


for i in range(int(input())):
	t = int(input())
	l = list(map(int, input().split()))
	l = sorted(l)
	ll = []
	l1 = l[0:len(l) // 2]
	l2 = l[len(l) // 2:len(l)]
	l2 = l2[::-1]
	for i in range(0, len(l1)):
		ll.append(l1[i])
		ll.append(l2[i])
	c = str(ll)[1:-1]
	d = c.replace(',', '')
	print(d)


for _ in range(int(input())):
	n = int(input())
	w = [int(i) for i in input().split()]
	w.sort()
	a = w[:n]
	b = w[n:]
	s = []
	for i in range(n):
		s.append(a[i])
		s.append(b[i])
	print(*s)


import sys
T = int(sys.stdin.readline())
for i in range(T):
	N = int(sys.stdin.readline())
	nums = list(map(int, sys.stdin.readline().split()))
	nums.sort()
	small = nums[:N]
	big = nums[N:]
	answer = []
	for j in range(N):
		answer.append(small[j])
		answer.append(big[j])
	print(' '.join((str(x) for x in answer)))


def solve(n, iarr):
	iarr.sort()
	ans = []
	for i in range(n):
		ans.append(str(iarr[i]))
		ans.append(str(iarr[n + i]))
	return ' '.join(ans)
T = int(input())
for t in range(T):
	n = int(input())
	iarr = list(map(int, input().split()))
	print(solve(n, iarr))


t = int(input())
for c in range(t):
	n = int(input())
	ls = list(map(int, input().split()))
	ls.sort()
	ans = [0] * (n * 2)
	for i in range(n):
		(ans[i * 2], ans[i * 2 + 1]) = (ls[i], ls[n + i])
	print(' '.join(map(str, ans)))


m = int(input())
otv = []
for _ in range(m):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	b = []
	i = 0
	j = n
	while j < n + n:
		b.append(a[i])
		i += 1
		b.append(a[j])
		j += 1
	otv.append(b)
for i in range(m):
	print(' '.join(map(str, otv[i])))


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	for i in range(1, 2 * n - 1, 2):
		(l[i], l[i + 1]) = (l[i + 1], l[i])
	for i in range(len(l)):
		l[i] = str(l[i])
	s = ' '.join(l)
	print(s)


import random

def meanfinder(lis):
	works = -1
	for i in range(len(lis)):
		if i + 1 > len(lis) - 1:
			big = lis[0]
		else:
			big = lis[i + 1]
		if (big + lis[i - 1]) / 2 == lis[i]:
			works = i
			return works
	return works
t = int(input())
for x in range(t):
	n = int(input())
	cases = 2 * n
	inp = input().split(' ')
	for b in range(len(inp)):
		inp[b] = int(inp[b])
	while True:
		random.shuffle(inp)
		if meanfinder(inp) == -1:
			res = ' '
			for y in range(len(inp)):
				res += str(inp[y]) + ' '
			print(res[:-1])
			break


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))[:2 * n]
	a.sort()
	for i in range(n):
		print(a[i], a[n + i], end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split(' '))))
	for i in range(0, len(a) - 1, 2):
		(a[i + 1], a[i]) = (str(a[i]), str(a[i + 1]))
	(a[0], a[-1]) = (a[-1], a[0])
	print(' '.join(a))


for x in range(int(input())):
	n = int(input())
	m = list(map(int, input().split()))
	m.sort(reverse=True)
	a = [0] * 2 * n
	for i in range(n):
		a[2 * i] = m[i]
	for i in range(n):
		a[2 * i + 1] = m[n + i]
	print(*a)


def mean(arr):
	arr.sort()
	s = []
	for i in range(len(arr) // 2):
		s.append(str(arr[i]))
		s.append(str(arr[len(arr) // 2 + i]))
	return ' '.join(s)
s = int(input())
a = []
for i in range(s):
	num = input()
	ar = [int(x) for x in input().split()]
	a.append(ar)
for i in a:
	print(mean(i))


from sys import stdin

def calculate(n, arr):
	arr.sort()
	(lo, hi) = (0, n)
	for i in range(2 * n):
		if i % 2 == 0:
			print(arr[lo], end=' ')
			lo += 1
		else:
			print(arr[hi], end=' ')
			hi += 1
t = int(stdin.readline().strip())
while t:
	n = int(stdin.readline().strip())
	arr = list(map(int, stdin.readline().strip().split()))
	calculate(n, arr)
	print()
	t -= 1


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	for j in range(0, n):
		print(a[n + j], end=' ')
		print(a[j], end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	i = 0
	j = 2 * n - 1
	ans = []
	for _ in range(n):
		ans.append(a[i])
		ans.append(a[j])
		i += 1
		j -= 1
	for c in ans:
		print(c, end=' ')
	print()


from bisect import bisect, bisect_left
from collections import *
from heapq import *
from math import gcd, ceil, sqrt, floor, inf, pi
from itertools import *
from operator import add, mul, sub, xor, truediv, floordiv
from functools import *
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().split())

def RLL():
	return list(map(int, sys.stdin.readline().split()))

def N():
	return int(input())

def A(n):
	return [0] * n

def AI(n, x):
	return [x] * n

def A2(n, m):
	return [[0] * m for i in range(n)]

def G(n):
	return [[] for i in range(n)]

def GP(it):
	return [[ch, len(list(g))] for (ch, g) in groupby(it)]
from types import GeneratorType

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc
mod = 10 ** 9 + 7
farr = [1]
ifa = []

def fact(x, mod=0):
	if mod:
		while x >= len(farr):
			farr.append(farr[-1] * len(farr) % mod)
	else:
		while x >= len(farr):
			farr.append(farr[-1] * len(farr))
	return farr[x]

def ifact(x, mod):
	global ifa
	fact(x, mod)
	ifa.append(pow(farr[-1], mod - 2, mod))
	for i in range(x, 0, -1):
		ifa.append(ifa[-1] * i % mod)
	ifa.reverse()

def per(i, j, mod=0):
	if i < j:
		return 0
	if not mod:
		return fact(i) // fact(i - j)
	return farr[i] * ifa[i - j] % mod

def com(i, j, mod=0):
	if i < j:
		return 0
	if not mod:
		return per(i, j) // fact(j)
	return per(i, j, mod) * ifa[j] % mod

def catalan(n):
	return com(2 * n, n) // (n + 1)

def isprime(n):
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			return False
	return True

def floorsum(a, b, c, n):
	if a == 0:
		return b // c * (n + 1)
	if a >= c or b >= c:
		return floorsum(a % c, b % c, c, n) + b // c * (n + 1) + a // c * n * (n + 1) // 2
	m = (a * n + b) // c
	return n * m - floorsum(c, c - b - 1, a, m - 1)

def inverse(a, m):
	a %= m
	if a <= 1:
		return a
	return (1 - inverse(m, a) * m) // a % m

def popcnt(x):
	ans = 0
	while x:
		ans += 1
		x &= x - 1
	return ans

def lowbit(n):
	return n & -n

class BIT:

	def __init__(self, arr):
		self.arr = arr
		self.n = len(arr) - 1

	def update(self, x, v):
		while x <= self.n:
			self.arr[x] += v
			x += x & -x

	def query(self, x):
		ans = 0
		while x:
			ans += self.arr[x]
			x &= x - 1
		return ans

class ST:

	def __init__(self, arr):
		n = len(arr)
		mx = n.bit_length()
		self.st = [[0] * mx for i in range(n)]
		for i in range(n):
			self.st[i][0] = arr[i]
		for j in range(1, mx):
			for i in range(n - (1 << j) + 1):
				self.st[i][j] = max(self.st[i][j - 1], self.st[i + (1 << j - 1)][j - 1])

	def query(self, l, r):
		if l > r:
			return -inf
		s = (r + 1 - l).bit_length() - 1
		return max(self.st[l][s], self.st[r - (1 << s) + 1][s])

class DSU:

	def __init__(self, n):
		self.c = [-1] * n

	def same(self, x, y):
		return self.find(x) == self.find(y)

	def find(self, x):
		if self.c[x] < 0:
			return x
		self.c[x] = self.find(self.c[x])
		return self.c[x]

	def union(self, u, v):
		(u, v) = (self.find(u), self.find(v))
		if u == v:
			return False
		if self.c[u] > self.c[v]:
			(u, v) = (v, u)
		self.c[u] += self.c[v]
		self.c[v] = u
		return True

	def size(self, x):
		return -self.c[self.find(x)]

class UFS:

	def __init__(self, n):
		self.parent = [i for i in range(n)]
		self.ranks = [0] * n

	def find(self, x):
		if x != self.parent[x]:
			self.parent[x] = self.find(self.parent[x])
		return self.parent[x]

	def union(self, u, v):
		(pu, pv) = (self.find(u), self.find(v))
		if pu == pv:
			return False
		if self.ranks[pu] >= self.ranks[pv]:
			self.parent[pv] = pu
			if self.ranks[pv] == self.ranks[pu]:
				self.ranks[pu] += 1
		else:
			self.parent[pu] = pv

class UF:

	def __init__(self, n):
		self.parent = [i for i in range(n)]
		self.ranks = [0] * n
		self.size = AI(n, 1)
		self.edge = A(n)

	def find(self, x):
		if x != self.parent[x]:
			self.parent[x] = self.find(self.parent[x])
		return self.parent[x]

	def union(self, u, v):
		(pu, pv) = (self.find(u), self.find(v))
		if pu == pv:
			self.edge[pu] += 1
			return False
		if self.ranks[pu] >= self.ranks[pv]:
			self.parent[pv] = pu
			self.edge[pu] += self.edge[pv] + 1
			self.size[pu] += self.size[pv]
			if self.ranks[pv] == self.ranks[pu]:
				self.ranks[pu] += 1
		else:
			self.parent[pu] = pv
			self.edge[pv] += self.edge[pu] + 1
			self.size[pv] += self.size[pu]

def Prime(n):
	c = 0
	prime = []
	flag = [0] * (n + 1)
	for i in range(2, n + 1):
		if not flag[i]:
			prime.append(i)
			c += 1
		for j in range(c):
			if i * prime[j] > n:
				break
			flag[i * prime[j]] = prime[j]
			if i % prime[j] == 0:
				break
	return flag

def dij(s, graph):
	d = AI(n, inf)
	d[s] = 0
	heap = [(0, s)]
	vis = A(n)
	while heap:
		(dis, u) = heappop(heap)
		if vis[u]:
			continue
		vis[u] = 1
		for (v, w) in graph[u]:
			if d[v] > d[u] + w:
				d[v] = d[u] + w
				heappush(heap, (d[v], v))
	return d

def bell(s, g):
	dis = AI(n, inf)
	dis[s] = 0
	for i in range(n - 1):
		for (u, v, w) in edge:
			if dis[v] > dis[u] + w:
				dis[v] = dis[u] + w
	change = A(n)
	for i in range(n):
		for (u, v, w) in edge:
			if dis[v] > dis[u] + w:
				dis[v] = dis[u] + w
				change[v] = 1
	return dis

def lcm(a, b):
	return a * b // gcd(a, b)

def lis(nums):
	res = []
	for k in nums:
		i = bisect.bisect_left(res, k)
		if i == len(res):
			res.append(k)
		else:
			res[i] = k
	return len(res)

def RP(nums):
	n = len(nums)
	s = set(nums)
	d = {}
	for (i, k) in enumerate(sorted(s), 1):
		d[k] = i
	bi = BIT([0] * (len(s) + 1))
	ans = 0
	for i in range(n - 1, -1, -1):
		ans += bi.query(d[nums[i]] - 1)
		bi.update(d[nums[i]], 1)
	return ans

def michange(a, b):
	d = defaultdict(deque)
	for (i, x) in enumerate(b):
		d[x].append(i)
	order = A(len(a))
	for (i, x) in enumerate(a):
		if not d:
			return -1
		order[i] = d[x].popleft()
	return RP(order)

class DLN:

	def __init__(self, val):
		self.val = val
		self.pre = None
		self.next = None

def nb(i, j, n, m):
	for (ni, nj) in [[i + 1, j], [i - 1, j], [i, j - 1], [i, j + 1]]:
		if 0 <= ni < n and 0 <= nj < m:
			yield (ni, nj)

def topo(n):
	q = deque()
	res = []
	for i in range(1, n + 1):
		if ind[i] == 0:
			q.append(i)
			res.append(i)
	while q:
		u = q.popleft()
		for v in g[u]:
			ind[v] -= 1
			if ind[v] == 0:
				q.append(v)
				res.append(v)
	return res

@bootstrap
def gdfs(r, p):
	for ch in g[r]:
		if ch != p:
			yield gdfs(ch, r)
	yield None
t = N()
for i in range(t):
	n = N()
	a = RLL()
	a.sort()
	ans = A(2 * n)
	for i in range(n):
		ans[i * 2] = a[i]
	for i in range(n, n * 2):
		ans[1 + (i - n) * 2] = a[i]
	print(*ans)


def solve(arr, n):
	arr = sorted(arr)
	res = []
	for i in range(n):
		res.append(arr[i])
		res.append(arr[i + n])
	return res
T = int(input())
for i in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	sol = solve(arr, n)
	print(' '.join(map(str, sol)))


t = int(input())
for _ in range(t):
	a = int(input())
	b = list(map(int, input().split()))
	b.sort()
	ptr1 = 0
	ptr2 = len(b) // 2
	ans = []
	while ptr2 < len(b):
		ans.append(b[ptr1])
		ans.append(b[ptr2])
		ptr1 += 1
		ptr2 += 1
	print(*ans)


import sys
input = sys.stdin.readline

def I():
	return input().strip()

def II():
	return int(input().strip())

def LI():
	return [*map(int, input().strip().split())]
import string, math, time, functools, random, fractions
from heapq import heappush, heappop, heapify
from bisect import bisect_left, bisect_right
from collections import deque, defaultdict, Counter, OrderedDict
from itertools import permutations, combinations, groupby
from operator import itemgetter
for _ in range(II()):
	n = II()
	a = LI()
	a.sort()
	ans = []
	n *= 2
	for i in range(n // 2):
		ans.append(a[i])
		ans.append(a[n - 1 - i])
	print(*ans)


import sys, os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	s = a[:n]
	b = a[n:]
	ans = []
	for i in range(n):
		ans.append(s[i])
		ans.append(b[i])
	print(*ans)


import logging
import sys
from inspect import currentframe
input = sys.stdin.readline
logging.basicConfig(level=logging.DEBUG)

def dbg(*args):
	id2names = {id(v): k for (k, v) in currentframe().f_back.f_locals.items()}
	logging.debug(', '.join((id2names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args)))

def solve():
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	reva = a[::-1]
	ans = []
	for i in range(n):
		ans.append(a[i])
		ans.append(reva[i])
	print(*ans)

def main():
	t = int(input())
	for _ in range(t):
		solve()
main()


import sys, os
import math
if os.path.exists('in.txt'):
	sys.stdin = open('in.txt', 'r')
from io import BytesIO, IOBase

def main():
	for _ in range(int(input())):
		n = int(input())
		arr = list(MI())
		arr.sort()
		out = [arr[0]]
		for i in range(1, n):
			out.append(arr[2 * i])
			out.append(arr[2 * i - 1])
		out.append(arr[-1])
		print(*out)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def MI():
	return map(int, input().split())

def outP(var):
	sys.stdout.write(str(var) + '\n')
MOD = 10 ** 9 + 7
mod = 998244353
main()


from sys import stdin
input = stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	s = a[:n]
	b = a[n:]
	ans = []
	for i in range(n):
		ans.append(s[i])
		ans.append(b[i])
	print(*ans)


for u in range(int(input())):
	n = int(input())
	x = [int(w) for w in input().split()]
	x = sorted(x)
	for i in range(1, 2 * n, 2):
		(x[i], x[i - 1]) = (x[i - 1], x[i])
	(x[0], x[-1]) = (x[-1], x[0])
	print(*x)


[(lambda n: (lambda arr: [print(f'{arr[i]} {arr[i + n]}', end=' \n'[i == n - 1]) for i in range(n)])(sorted(list(map(int, input().split())))))(int(input())) for _ in range(int(input()))]


for _ in range(int(input())):
	a = int(input())
	lst = [0] * (a * 2)
	l = list(map(int, input().split()))
	l.sort()
	j = 0
	for i in range(len(l) // 2):
		lst[j] = l[i]
		j += 2
	j = 1
	for i in range(len(l) // 2, len(l)):
		lst[j] = l[i]
		j += 2
	print(*lst)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	b = [a[x] for x in range(n)]
	c = [a[x] for x in range(n, 2 * n)][::-1]
	for i in range(n):
		print(b[i], c[i], end=' ')
	print()


from sys import stdin, stdout, setrecursionlimit as srl
from threading import stack_size
from collections import deque, defaultdict as dd
from math import gcd, ceil
input = stdin.readline
flush = stdout.flush
tc = 1
tc = int(input())
for _ in range(tc):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	for i in range(1, n, 2):
		(l[i], l[2 * n - i - 1]) = (l[2 * n - i - 1], l[i])
	print(*l)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ans = []
	f = True
	a1 = a[:n]
	a2 = a[n:]
	for i in range(n):
		ans.append(a2[i])
		ans.append(a1[i])
	print(*ans)


for _ in range(int(input())):
	a = int(input())
	b = list(map(int, input().split()))
	b.sort()
	l = []
	k = len(b) - 1
	for i in range(len(b) // 2):
		l.append(b[i])
		l.append(b[k - i])
	s = ' '.join(map(str, l))
	print(s)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ans = [0] * len(a)
	l = 0
	m = len(a) - 1
	for i in range(len(a)):
		if i % 2 == 0:
			ans[i] = a[l]
			l += 1
		else:
			ans[i] = a[m]
			m -= 1
	print(*ans)


from math import *
from sys import *
from bisect import *
from collections import *
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	a.sort()
	b = []
	(j, k) = (2 * n - 1, 0)
	f = 0
	for i in range(2 * n):
		if f == 0:
			b.append(a[j])
			j -= 1
			f = 1
		else:
			b.append(a[k])
			k += 1
			f = 0
	print(*b)


for _ in range(int(input())):
	n = int(input())
	s = sorted(list(map(int, input().split())))
	for i in range(n):
		print(s[i], s[-i - 1], end=' ')
	print()


for _ in range(int(input())):
	l = []
	n = int(input())
	l = list(map(int, input().split()))
	new = []
	for i in range(n):
		l.sort()
		new.append(l[i])
		new.append(l[i + n])
	for x in new:
		print(x, end=' ')


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	per = list(map(int, sys.stdin.readline().split()))
	answer = []
	per.sort()
	for i in per:
		answer.append(str(i))
		answer.append(str(per.pop()))
	print(' '.join(answer))


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	b = [0] * (2 * n)
	for i in range(n):
		b[2 * i] = a[i]
		b[2 * i + 1] = a[i + n]
	print(*b)


def solve(n, a):
	a = sorted(a)
	i = 0
	while i < 2 * n:
		(a[i], a[i + 1]) = (a[i + 1], a[i])
		i += 2
	(a[0], a[-1]) = (a[-1], a[0])
	return ' '.join(map(str, a))
T = int(input())
for case in range(T):
	N = int(input())
	A = map(int, input().split())
	res = solve(N, A)
	print(res)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	if n == 1:
		print(' '.join(map(str, arr)))
		continue
	arr_a = arr[n:]
	final = []
	for x in range(n):
		final.extend([arr[x], arr_a[x]])
	print(' '.join(map(str, final)))


for v in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	for i in range(0, n, 2):
		(a[i], a[-i - 1]) = (a[-i - 1], a[i])
	print(*a)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	(first, second) = (a[:n], a[n:])
	for i in range(n):
		print(first[i], second[i], end=' ')
	print()


from sys import stdin, stdout, maxsize
from math import sqrt, log, factorial as ft, gcd, ceil, floor
from collections import defaultdict
from bisect import insort
ii = lambda : int(input())
di = lambda : defaultdict(lambda : 0)
dl = lambda : defaultdict(lambda : list())
li = lambda : list(map(int, stdin.readline().strip().split()))
mi = lambda : map(int, stdin.readline().strip().split())
si = lambda : stdin.readline().strip()
for _ in range(1, ii() + 1):
	n = ii()
	a = li()
	a.sort()
	(h1, h2) = (a[:n], a[n:])
	h1 = h1[::-1]
	for i in range(n):
		print(h1.pop(), h2.pop(), end=' ')
	print()


def solve(N, digits):
	digits.sort()
	new_order = []
	for i in range(N):
		new_order.append(digits[i])
		new_order.append(digits[N + i])
	return [str(x) for x in new_order]
T = int(input())
for t in range(1, T + 1):
	N = int(input())
	digits = [int(x) for x in input().split(' ')]
	res = solve(N, digits)
	print('{res}'.format(t=t, res=' '.join(res), flush=True))


from random import random

def good(a, n):
	for i in range(1, 2 * n - 1):
		if a[i - 1] + a[i + 1] == a[i] * 2:
			return False
	if a[0] * 2 == a[1] + a[-1]:
		return False
	if a[-1] * 2 == a[-2] + a[0]:
		return False
	return True
for nt in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	while not good(a, n):
		a = sorted(a, key=lambda x: random())
	print(*a)


for _ in range(int(input())):
	n = int(input())
	n *= 2
	a = list(map(int, input().split()))
	a.sort()
	ans = []
	for i in range(n // 2):
		ans.append(a[i])
		ans.append(a[n - 1 - i])
	print(*ans)


from sys import stdin, stdout
from math import ceil, floor, sqrt, log, log2, log10
from collections import Counter
import random
int_max = float('inf')
int_min = -float('inf')
input = stdin.readline

def shuffler(arr, n):
	for i in range(n - 1, 0, -1):
		j = random.randint(0, i + 1)
		(arr[i], arr[j]) = (arr[j], arr[i])
	return arr

def solve():
	pass
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	output = []
	i = 0
	j = n
	while i < n:
		output.append(arr[i])
		output.append(arr[j])
		i += 1
		j += 1
	print(*output)


t1 = int(input())
for _ in range(t1):
	n = int(input())
	t = ''
	a2 = list(map(int, input().split()))
	a2.sort()
	a = a2[:n]
	a1 = a2[n:]
	for i in range(n):
		t += str(a[i]) + ' '
		t += str(a1[i]) + ' '
	print(t)


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	alow = a[0:n]
	ahigh = a[n:]
	b = []
	for i in range(n):
		b.append(str(alow[i]))
		b.append(str(ahigh[i]))
	separator = ' '
	print(separator.join(b))


def meanInequality(nums, n):
	nums.sort()
	nums_permuate = []
	i = j = 0
	while i < n:
		if j % 2 == 0:
			nums_permuate.append(nums[i])
		else:
			nums_permuate.append(nums[i + n])
		if j % 2 == 1:
			i += 1
		j += 1
	return ' '.join((str(num) for num in nums_permuate))
T = int(input())
for t in range(T):
	n = int(input())
	arr = [int(num) for num in input().split()]
	print(meanInequality(arr, n))


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	ans = []
	l = 0
	r = 2 * n - 1
	while l < r:
		ans.append(arr[r])
		ans.append(arr[l])
		l += 1
		r -= 1
	print(*ans)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	if n == 1:
		print(*a)
		continue
	else:
		start = 0
		finish = 2 * n - 1
		for i in range(2 * n):
			if i % 2 == 0:
				print(a[start], end=' ')
				start += 1
			else:
				print(a[finish], end=' ')
				finish -= 1


import sys, os.path
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	l = []
	r = []
	for i in range(2 * n):
		if i < n:
			l.append(a[i])
		else:
			r.append(a[i])
	ans = []
	for i in range(n):
		ans.append(l[i])
		ans.append(r[i])
	print(*ans)


t = int(input())
for testcase in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	arr1 = arr[:n]
	arr2 = arr[n:]
	res = []
	for i in range(n):
		res.append(arr1[i])
		res.append(arr2[i])
	print(' '.join([str(num) for num in res]))


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	for i in range(n):
		print(l[i], l[n + i], end=' ')
	print()


from itertools import combinations, permutations, combinations_with_replacement, product
import itertools
from timeit import timeit
import timeit
import time
from time import time
from random import *
import random
import collections
import bisect
import os
import math
from collections import defaultdict, OrderedDict, Counter
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
from queue import Queue, PriorityQueue
from heapq import *
from statistics import *
from math import sqrt, log10, log2, log, gcd, ceil, floor
import fractions
import copy
from copy import deepcopy
import sys
import io
import string
from string import ascii_lowercase, ascii_uppercase, ascii_letters, digits
sys.setrecursionlimit(10000)
mod = int(pow(10, 9)) + 7

def ncr(n, r, p=mod):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def normalncr(n, r):
	r = min(r, n - r)
	count = 1
	for i in range(n - r, n + 1):
		count *= i
	for i in range(1, r + 1):
		count //= i
	return count
inf = float('inf')
adj = defaultdict(set)
visited = defaultdict(int)

def addedge(a, b):
	adj[a].add(b)
	adj[b].add(a)

def bfs(v):
	q = Queue()
	q.put(v)
	visited[v] = 1
	while q.qsize() > 0:
		s = q.get_nowait()
		print(s)
		for i in adj[s]:
			if visited[i] == 0:
				q.put(i)
				visited[i] = 1

def dfs(v, visited):
	if visited[v] == 1:
		return
	visited[v] = 1
	print(v)
	for i in adj[v]:
		dfs(i, visited)

def reverse_bisect_right(a, x, lo=0, hi=None):
	if lo < 0:
		raise ValueError('lo must be non-negative')
	if hi is None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if x > a[mid]:
			hi = mid
		else:
			lo = mid + 1
	return lo

def reverse_bisect_left(a, x, lo=0, hi=None):
	if lo < 0:
		raise ValueError('lo must be non-negative')
	if hi is None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if x >= a[mid]:
			hi = mid
		else:
			lo = mid + 1
	return lo

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

def make_list(m):
	m += list(map(int, input().split()))

def get_str_list_in_int():
	return [int(i) for i in list(input())]

def get_str_list():
	return list(input())

def get_map():
	return map(int, input().split())

def input_int():
	return int(input())

def matrix(a, b):
	return [[0 for i in range(b)] for j in range(a)]

def swap(a, b):
	return (b, a)

def find_gcd(l):
	a = l[0]
	for i in range(len(l)):
		a = gcd(a, l[i])
	return a

def is_prime(n):
	sqrta = int(sqrt(n))
	for i in range(2, sqrta + 1):
		if n % i == 0:
			return 0
	return 1

def prime_factors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n //= 2
	sqrta = int(sqrt(n))
	for i in range(3, sqrta + 1, 2):
		while n % i == 0:
			n //= i
			l.append(i)
	if n > 2:
		l.append(n)
	return l

def p(a):
	if type(a) == str:
		print(a + '\n')
	else:
		print(str(a) + '\n')

def ps(a):
	if type(a) == str:
		print(a)
	else:
		print(str(a))

def kth_no_not_div_by_n(n, k):
	return k + (k - 1) // (n - 1)

def forward_array(l):
	n = len(l)
	stack = []
	forward = [0] * n
	for i in range(len(l) - 1, -1, -1):
		while len(stack) and l[stack[-1]] < l[i]:
			stack.pop()
		if len(stack) == 0:
			forward[i] = len(l)
		else:
			forward[i] = stack[-1]
		stack.append(i)
	return forward

def forward_array_notequal(l):
	n = len(l)
	stack = []
	forward = [n] * n
	for i in range(len(l) - 1, -1, -1):
		while len(stack) and l[stack[-1]] <= l[i]:
			stack.pop()
		if len(stack) == 0:
			forward[i] = len(l)
		else:
			forward[i] = stack[-1]
		stack.append(i)
	return forward

def backward_array(l):
	n = len(l)
	stack = []
	backward = [0] * n
	for i in range(len(l)):
		while len(stack) and l[stack[-1]] < l[i]:
			stack.pop()
		if len(stack) == 0:
			backward[i] = -1
		else:
			backward[i] = stack[-1]
		stack.append(i)
	return backward

def char(a):
	return chr(a + 97)

def get_length(a):
	return a.bit_length()

def issq(n):
	sqrta = int(n ** 0.5)
	return sqrta ** 2 == n

def ceil(a, b):
	return int((a + b - 1) / b)

def equal_sum_partition(arr, n):
	sum = 0
	for i in range(n):
		sum += arr[i]
	if sum % 2 != 0:
		return False
	part = [[True for i in range(n + 1)] for j in range(sum // 2 + 1)]
	for i in range(0, n + 1):
		part[0][i] = True
	for i in range(1, sum // 2 + 1):
		part[i][0] = False
	for i in range(1, sum // 2 + 1):
		for j in range(1, n + 1):
			part[i][j] = part[i][j - 1]
			if i >= arr[j - 1]:
				part[i][j] = part[i][j] or part[i - arr[j - 1]][j - 1]
	return part[sum // 2][n]

def bin_sum_array(arr, n):
	for i in range(n):
		if arr[i] % 2 == 1:
			return i + 1
	binarray = [list(reversed(bin(i)[2:])) for i in arr]
	new_array = [0 for i in range(32)]
	for i in binarray:
		for j in range(len(i)):
			if i[j] == '1':
				new_array[j] += 1
	return new_array

def ispalindrome(s):
	return s == s[::-1]

def get_prefix(l):
	if l == []:
		return []
	prefix = [l[0]]
	for i in range(1, len(l)):
		prefix.append(prefix[-1] + l[i])
	return prefix

def get_suffix(l):
	if l == []:
		return []
	suffix = [l[-1]] * len(l)
	for i in range(len(l) - 2, -1, -1):
		suffix[i] = suffix[i + 1] + l[i]
	return suffix
nc = 'NO'
yc = 'YES'
ns = 'No'
ys = 'Yes'

def yesno(a):
	print(yc if a else nc)

def reduce(dict, a):
	dict[a] -= 1
	if dict[a] == 0:
		dict.pop(a)
import sys
import io
from sys import stdin, stdout
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
t = 1
t = int(input())
for i in range(t):
	n = int(input())
	l = get_list()
	l.sort()
	arr = [0] * 2 * n
	counter = 0
	for i in range(0, 2 * n, 2):
		arr[i] = l[counter]
		counter += 1
	for i in range(1, 2 * n, 2):
		arr[i] = l[counter]
		counter += 1
	print(' '.join(map(str, arr)) + '\n')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	b = []
	for i in range(n):
		b.append(a[n + i])
		b.append(a[i])
	b = [str(s) for s in b]
	print(' '.join(b))


for _ in range(int(input())):
	N = int(input())
	A = [int(i) for i in input().split()]
	A.sort()
	for i in range(N):
		print(A[i], A[N + i], end=' ')
	print()


import sys
import math
import random

def solve(s):
	pass
t = int(input())
for tt in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	if n == 1:
		arr.reverse()
		print(*arr)
	else:
		i = 1
		while i < 2 * n - 1:
			(arr[i], arr[i + 1]) = (arr[i + 1], arr[i])
			i += 2
		print(*arr)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	new = []
	(block1, block2) = (0, len(a) // 2)
	while block1 < len(a) // 2:
		new.append(a[block1])
		new.append(a[block2])
		block2 += 1
		block1 += 1
	new = [str(k) for k in new]
	print(' '.join(new))


for _ in range(int(input())):
	n = int(input())
	flst = list(map(int, input().split()))
	flst.sort()
	rlst = flst[:]
	rlst.reverse()
	final = []
	for i in range(n):
		final.append(flst[i])
		final.append(rlst[i])
	ans = ' '.join([str(elem) for elem in final])
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().rstrip().split()))
	arr.sort()
	c1 = arr[:n]
	c2 = arr[n:]
	for i in range(n):
		arr[2 * i] = c1[i]
		arr[2 * i + 1] = c2[i]
	print(*arr)


from sys import stdin
input = stdin.readline
from itertools import product

def solve():
	n = int(input())
	arr = sorted([int(char) for char in input().split()])
	ans = []
	for i in range(n):
		ans.append(arr[i])
		ans.append(arr[2 * n - 1 - i])
	return ans
for _ in range(int(input())):
	print(*solve())


t = int(input())
for _ in range(t):
	n = int(input())
	elements = tuple(map(int, input().split()))
	asc_sorted = sorted(elements)
	desc_sorted = sorted(elements, reverse=True)
	res = []
	for i in range(n):
		res.append(str(asc_sorted[i]))
		res.append(str(desc_sorted[i]))
	print(' '.join(res))


from collections import *
import sys
input = sys.stdin.readline
sys.setrecursionlimit(3 * 10 ** 5)

def inp():
	return int(input())

def st():
	return input().rstrip('\n')

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

def ma():
	return map(int, input().split())
t = inp()
while t:
	n = inp()
	a = lis()
	t -= 1
	a.sort()
	for i in range(n):
		print(a[i], end=' ')
		print(a[-1 - i], end=' ')
	print()


for _ in range(0, int(input())):
	n = int(input())
	v = sorted(map(int, input().split()))
	x = zip(v[0:n], v[n:2 * n])
	a = []
	for c in x:
		a.append(c[0])
		a.append(c[1])
	print(*a)


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	l2 = []
	for i in range(n):
		l2.append(l[i])
		l2.append(l[2 * n - i - 1])
	print(*l2)


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


def solve():
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	b = []
	for (x, y) in zip(a[:n], a[n:]):
		b.extend([x, y])
	return ' '.join((str(x) for x in b))
for _ in range(int(input())):
	print(solve())


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	for i in range(n):
		print(a[i], a[-1 - i], end=' ')
	print('', end='\n')


import os
import sys
from io import BytesIO, IOBase
from functools import lru_cache, reduce
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from bisect import bisect, bisect_left, bisect_right
import math
import threading
import time

def I():
	return input()

def get_int():
	return int(input())

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

def get_map():
	return map(int, input().split())

def get_list_str(li, s=' '):
	print(s.join(map(str, li)))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def solve():
	n = get_int()
	ls = get_list()
	ans = []
	ls.sort()
	(i, j) = (0, 2 * n - 1)
	while i < j:
		ans.append(ls[i])
		ans.append(ls[j])
		i += 1
		j -= 1
	if i == j:
		ans.append(ls[i])
	print(*ans)

def main():
	testcases = True
	if testcases:
		t = get_int()
		for _ in range(t):
			solve()
	else:
		solve()
main()


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	b = []
	for i in range(n):
		b.append(a[i])
		b.append(a[i + n])
	print(*b)


m = int(input())
for i in range(0, m):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	b = a[0:n]
	c = a[n:]
	l = []
	for (i, j) in zip(b, c):
		l.append(i)
		l.append(j)
	l = [str(u) for u in l]
	print(' '.join(l))


for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split(' ')]
	a.sort()
	b = []
	p1 = 0
	p2 = 2 * n - 1
	for i in range(2 * n):
		if i % 2:
			b.append(a[p1])
			p1 += 1
		else:
			b.append(a[p2])
			p2 -= 1
	print(*b)


for _ in range(int(input())):
	n = int(input())
	arr = sorted(list(map(int, input().split())))
	uno = arr[:n]
	dos = arr[n:]
	z = 0
	while z < n:
		print(uno[z], dos[z], end=' ')
		z += 1


def solve(n, a):
	ans = []
	if n == 1:
		for i in a:
			ans.append(str(i))
		return ' '.join(ans)
	a.sort()
	mid_ele = a[n - 1]
	i = 0
	while i < n:
		ans.append(str(a[n - 1 - i]))
		ans.append(str(a[n + i]))
		i += 1
	return ' '.join(ans)
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().strip().split()))[:2 * n]
	print(solve(n, a))


def solve():
	n = int(input())
	lst = sorted(map(int, input().split()))
	arr = [0] * (2 * n)
	k = n
	for i in range(0, 2 * n, 2):
		arr[i] = lst[k]
		k += 1
	k = 0
	for i in range(1, 2 * n, 2):
		arr[i] = lst[k]
		k += 1
	print(*arr)
for test in range(int(input())):
	solve()


import sys
input = sys.stdin.readline
from collections import defaultdict as dc
from collections import Counter
from bisect import bisect_right, bisect_left, bisect
import math
from operator import itemgetter
from heapq import heapify, heappop, heappush
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	p = [0] * (2 * n)
	(i, j) = (0, 2 * n - 1)
	for c in range(2 * n):
		if c % 2 == 0:
			p[c] = l[i]
			i += 1
		else:
			p[c] = l[j]
			j -= 1
	print(*p)


for i in range(int(input())):
	n = int(input())
	if n == 1:
		a = input()
		print(a)
		continue
	a = list(map(int, input().split()))
	a.sort()
	a0 = a[0:len(a) // 2]
	a1 = a[len(a) // 2:]
	a1.reverse()
	l = []
	i = 0
	while len(a0) != 0 or len(a1) != 0:
		x = a1.pop(i)
		l.append(str(x))
		y = a0.pop(i)
		l.append(str(y))
	print(' '.join(l))


def getlistint():
	return list(map(int, stdin.readline().split()))

def getmapint():
	return map(int, stdin.readline().split())

def getliststr():
	return list(stdin.readline().split())

def getint():
	return int(stdin.readline().strip())

def getstr():
	return stdin.readline().strip()

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

def prlist(l):
	stdout.write(' '.join(list(map(str, l))) + '\n')
from sys import stdin, stdout
for _ in range(getint()):
	n = getint()
	a = getlistint()
	a.sort()
	b = []
	for i in range(n):
		b.append(a[i])
		b.append(a.pop())
	prlist(b)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	l = len(arr) // 2
	for i in range(0, l):
		print(arr[i], arr[l + i], end=' ')
	print()


t = int(input())
while t:
	t -= 1
	n = int(input())
	nums = list(map(int, input().split()))
	nums.sort()
	l = 0
	for i in range(n, 2 * n):
		print(nums[i], nums[l], end=' ')
		l += 1
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	a = sorted(map(int, input().split()))
	k = -1
	for i in range(2 * n):
		k = (k + n) % (2 * n + 1)
		print(a[k], end=' ')
	print()


t = int(input())
for p in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ans = [0 for i in range(2 * n)]
	for i in range(n):
		ans[2 * i] = a[i]
	for i in range(n):
		ans[2 * i + 1] = a[i + n]
	print(*ans)


test = int(input())
for i in range(test):
	n = int(input())
	m = 2 * n
	arr = list(map(int, input().split()))
	marr = sorted(arr)
	(ans1, ans2) = ([], [])
	for j in range(m):
		if j < n:
			ans1.append(marr[j])
		else:
			ans2.append(marr[j])
	ans = []
	for j in range(len(ans1)):
		ans.append(ans1[j])
		ans.append(ans2[j])
	print(*ans)


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	n = 2 * n
	i = 0
	j = n - 1
	while i < j:
		print(ar[i], ar[j], end=' ')
		i += 1
		j -= 1
	print()


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().strip().split()))
	l.sort()
	k = l[0:n]
	m = l[n:]
	f = []
	for i in range(len(k)):
		f.append(k[i])
		f.append(m[i])
	print(' '.join([str(x) for x in f]))


import sys

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

def isSubSequence(str1, str2):
	m = len(str1)
	n = len(str2)
	j = 0
	i = 0
	while j < m and i < n:
		if str1[j] == str2[i]:
			j = j + 1
		i = i + 1
	return j == m
t = int(input())
mod = pow(10, 9) + 7
while t > 0:
	n = 2 * int(input())
	l = [int(x) for x in input().split()]
	if n <= 2:
		print(*l)
	else:
		l.sort()
		f = []
		for i in range(n // 2):
			f.append(l[i])
			f.append(l[n - i - 1])
		print(*f)
	t -= 1


from math import *
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	for i in range(n * 2):
		print(arr[(i + 1) // 2 * (-1 if i % 2 else 1)], end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	n = 2 * n
	i = 0
	j = n - 1
	res = [None] * n
	k = 0
	while j > i:
		res[k] = arr[i]
		k += 1
		res[k] = arr[j]
		k += 1
		i += 1
		j -= 1
	print(' '.join(map(str, res)))


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


def f(A, B, n):
	i = 0
	C = ''
	while i < n - 1:
		C = C + '{} {} '.format(A[i], B[i])
		i = i + 1
	return C + '{} {}'.format(A[-1], B[-1])
j = int(input())
while j > 0:
	k = int(input())
	A = [int(i) for i in input().split(' ')]
	A.sort()
	B = A[0:k]
	C = A[k:]
	print(f(B, C, k))
	j = j - 1


t = int(input())
for r in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	s = []
	for i in range(n):
		s.append(l[i])
		s.append(l[n + i])
	for i in s:
		print(i, end=' ')


import math
import sys
import itertools
import fractions
wtf = sys.stdin.read()
wtf = wtf.strip().split('\n')
for t in [wtf[i:i + 2] for i in range(1, len(wtf), 2)]:
	n = 2 * int(t[0])
	A = sorted(map(int, t[1].split()))
	for i in range(n):
		if i % 2 != 0 and i + 1 < n:
			(A[i], A[i + 1]) = (A[i + 1], A[i])
	print(' '.join(map(str, A)))


t = int(input())
for i in range(t):
	n = int(input())
	arr = input().split(' ')
	arr = list(map(int, arr))
	arr.sort()
	b = []
	for i in range(n):
		b.append(arr[i])
		b.append(arr[n + i])
	s = [str(i) for i in b]
	res = ' '.join(s)
	print(res)


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	a1 = a[:n]
	a2 = a[n:]
	if len(a) <= 2:
		for i in a:
			print(i, end=' ')
		print('\n', end='')
		continue
	for i in range(n):
		print(a1[i], a2[i], end=' ')
	print('\n', end='')


def sol(array):
	to_ret = []
	array.sort()
	(i, j) = (0, len(array) - 1)
	while i <= j:
		to_ret.append(str(array[j]))
		to_ret.append(str(array[i]))
		i += 1
		j -= 1
	return to_ret
a = int(input())
for i in range(a):
	b = int(input())
	c = input()
	c = c.split()
	temp = []
	for char in c:
		temp.append(int(char))
	print(' '.join(sol(temp)))


for i in range(int(input())):
	n = int(input())
	a = [int(j) for j in input().split()]
	a.sort()
	c = a[:n]
	d = a[n:]
	b = []
	for j in range(2 * n):
		if j % 2 == 0:
			b.append(d[n - 1 - j // 2])
		else:
			b.append(c[(j - 1) // 2])
	print(*b)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	pt2 = n
	pt1 = 0
	for i in range(n):
		print(arr[pt1], arr[pt2], end=' ')
		pt1 += 1
		pt2 += 1
	print()


from sys import stdin

def main():
	input = lambda : stdin.readline()[:-1]
	T = int(input())
	for _ in [0] * T:
		N = int(input())
		A = list(map(int, input().split()))
		A.sort()
		(x, y) = (A[:N], A[N:])
		ans = []
		for (i, j) in zip(x, y):
			ans.append(i)
			ans.append(j)
		print(*ans)
main()


test = int(input())
while test > 0:
	test = test - 1
	l = int(input())
	lst = list(map(int, input().strip().split()))
	lst.sort()
	temp = 0
	if l > 1:
		for i in range(1, len(lst) - 1):
			if lst[i - 1] < lst[i] and lst[i] < lst[i + 1]:
				temp = lst[i + 1]
				lst[i + 1] = lst[i]
				lst[i] = temp
	else:
		lst.sort(reverse=True)
	print(*lst)


num = int(input())
for i in range(num):
	n = int(input())
	arr = input()
	arr = arr.split(' ')
	arr = [int(x) for x in arr]
	if len(arr) <= 2:
		print(' '.join([str(x) for x in arr]))
	else:
		count = 1
		while count > 0:
			count = 0
			for j in range(2 * n):
				if j == 0:
					if (arr[1] + arr[2 * n - 1]) / 2 == arr[j]:
						temp = arr[j]
						arr[j] = arr[1]
						arr[1] = temp
						count += 1
				elif j == 2 * n - 1:
					if (arr[j - 1] + arr[0]) / 2 == arr[j]:
						temp = arr[j]
						arr[j] = arr[0]
						arr[0] = temp
						count += 1
				elif (arr[j - 1] + arr[j + 1]) / 2 == arr[j]:
					temp = arr[j]
					arr[j] = arr[j + 1]
					arr[j + 1] = temp
					count += 1
		print(' '.join([str(x) for x in arr]))


def main():
	t = int(input())
	allans = []
	for _ in range(t):
		n = int(input())
		a = readIntArr()
		a.sort()
		ans = [-1] * (2 * n)
		j = 0
		for i in range(n):
			ans[j] = a[i]
			j += 2
		j = 1
		for i in range(n, 2 * n):
			ans[j] = a[i]
			j += 2
		allans.append(ans)
	multiLineArrayOfArraysPrint(allans)
	return
import sys
input = sys.stdin.buffer.readline

def oneLineArrayPrint(arr):
	print(' '.join([str(x) for x in arr]))

def multiLineArrayPrint(arr):
	print('\n'.join([str(x) for x in arr]))

def multiLineArrayOfArraysPrint(arr):
	print('\n'.join([' '.join([str(x) for x in y]) for y in arr]))

def readIntArr():
	return [int(x) for x in input().split()]

def makeArr(defaultValFactory, dimensionArr):
	dv = defaultValFactory
	da = dimensionArr
	if len(da) == 1:
		return [dv() for _ in range(da[0])]
	else:
		return [makeArr(dv, da[1:]) for _ in range(da[0])]

def queryInteractive(i, j):
	print('? {} {}'.format(i, j))
	sys.stdout.flush()
	return int(input())

def answerInteractive(ans):
	print('! {}'.format(' '.join([str(x) for x in ans])))
	sys.stdout.flush()
inf = float('inf')
MOD = 10 ** 9 + 7
for _abc in range(1):
	main()


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	final = []
	for (i, j) in zip(a[:n], a[-1:n - 1:-1]):
		final.extend([i, j])
	print(' '.join(map(str, final)))


def answer():
	b = [-1] * (2 * n)
	ind = 0
	for i in range(0, 2 * n, 2):
		b[i] = a[ind]
		ind += 1
	ind = 2 * n - 1
	for i in range(1, 2 * n, 2):
		b[i] = a[ind]
		ind -= 1
	return b
for T in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	print(*answer())


import sys
input = sys.stdin.readline
import math
from collections import deque
mod = 10 ** 9 + 7

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
for _ in range(inp()):
	n = inp()
	l = inlt()
	l.sort()
	o = []
	for i in range(n):
		o.append(l[i])
		o.append(l[n + i])
	print(*o)


from random import shuffle
import sys
for _ in range(int(input())):
	x = int(input())
	y = list(map(int, input().split()))
	t = True
	while t:
		for i in range(1, 2 * x - 1, 1):
			if y[i] == (y[i - 1] + y[i + 1]) // 2 or y[0] == (y[-1] + y[1]) // 2 or y[-1] == (y[-2] + y[0]) // 2:
				shuffle(y)
				break
		else:
			t = False
			print(*y)


import collections

def read_ints():
	result = map(int, input().split())
	return tuple(result)

def main():
	[t_n] = read_ints()
	for i_t in range(t_n):
		[a_n] = read_ints()
		a_seq = collections.deque(sorted(read_ints()))
		b_seq = []
		while a_seq:
			b_seq.append(a_seq.popleft())
			if a_seq:
				b_seq.append(a_seq.pop())
		print(*b_seq)
main()


import sys
input = iter(sys.stdin.read().splitlines()).__next__
TC = int(input())
for tc in range(TC):
	N = int(input())
	A = list(map(int, input().split()))
	A.sort()
	res = [A[i // 2] if i % 2 == 0 else A[i // 2 + N] for i in range(2 * N)]
	print(' '.join(map(str, res)))


import os
import sys
import math
import collections
import functools
import itertools
import heapq
import bisect
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcde'
M = 10 ** 9 + 7
EPS = 1e-06

def Ceil(a, b):
	return a // b + int(a % b > 0)

def INT():
	return int(input())

def STR():
	return input()

def INTs():
	return tuple(map(int, input().split()))

def ARRINT():
	return [int(i) for i in input().split()]

def ARRSTR():
	return [i for i in input().split()]
for _ in range(INT()):
	n = INT()
	arr = ARRINT()
	arr.sort()
	res = []
	while True:
		remains = []
		narr = [arr[0]]
		for i in range(len(arr) - 2):
			if arr[i + 1] - arr[i] == arr[i + 2] - arr[i + 1]:
				remains += [arr[i + 1]]
			else:
				narr += [arr[i + 1]]
		narr += [arr[-1]]
		if not remains:
			break
		else:
			arr = narr + remains
	if arr[1] + arr[-1] == arr[0] * 2 or arr[0] + arr[-2] == arr[-1] * 2:
		(arr[0], arr[-1]) = (arr[-1], arr[0])
	print(*arr)


for _ in range(int(input())):
	n = int(input())
	array = list(map(int, input().split()))
	array.sort()
	res = []
	for i in range(n):
		res.append(array[i])
		res.append(array[-(i + 1)])
	print(*res)


t = int(input())
while t:
	num = int(input())
	l = list(map(int, input().split()))
	k = len(l)
	l.sort()
	for i in range(k // 2):
		print(l[i], l[k - i - 1], end=' ')
	print()
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr.sort()
	l = len(arr)
	for i in range(0, l // 2):
		print(arr[i], end=' ')
		print(arr[i + n], end=' ')
	print()


def linput():
	return list(map(int, input().split()))
for _ in range(int(input())):
	n = int(input())
	l = sorted(linput())
	ans = [0 for i in range(2 * n)]
	for i in range(n):
		ans[2 * i] = l[i]
		ans[2 * i + 1] = l[n + i]
	print(*ans)


for _ in range(int(input())):
	n = int(input())
	a = sorted(map(int, input().split()))
	ans = [str(a[i]) + ' ' + str(a[n + i]) for i in range(n)]
	print(' '.join(ans))


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a = sorted(a)
	s = ''
	b = [a[0]]
	for x in range(1, 2 * n - 1):
		if x % 2 == 0:
			b.append(a[x - 1])
		else:
			b.append(a[x + 1])
	b.append(a[-1])
	for x in b:
		s += str(x) + ' '
	print(s)


import math
letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	A.sort()
	A1 = A[:n]
	A2 = A[n:]
	A2.reverse()
	r = []
	for i in range(n):
		r.append(A1[i])
		r.append(A2[i])
	print(' '.join(map(str, r)))


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


ts = int(input())
for it in range(0, ts):
	n = int(input())
	num = [int(x) for x in input().split()]
	num.sort()
	for i in range(0, n):
		(print(str(num[i]) + ' ' + str(num[i + n]), end=' '),)
	print('')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	b = a[:n]
	c = a[n:]
	r = []
	for i in range(len(c)):
		r.append(c[i])
		r.append(b[i])
	print(*r)


import math
import string
import random
import sys
from random import randrange
from collections import deque
from collections import defaultdict
from bisect import bisect, bisect_right, bisect_left

def data():
	return sys.stdin.readline().strip()

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write(' '.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
for _ in range(int(input())):
	n = int(data())
	a = mdata()
	a.sort(reverse=True)
	ans = []
	start = 0
	end = 2 * n - 1
	while start < end:
		ans.append(a[start])
		ans.append(a[end])
		start += 1
		end -= 1
	print(*ans)


def solve(a, n):
	a = sorted(a)
	l = []
	for i in range(n):
		l.extend([a[i], a[i + n]])
	return ' '.join([str(x) for x in l])
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	print(solve(a, n))


for ttt in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	for i in range(0, n, 2):
		(arr[i], arr[2 * n - i - 1]) = (arr[2 * n - i - 1], arr[i])
	print(*arr)


import sys
from pprint import pprint

def do():
	n = int(input())
	dat = list(map(int, input().split()))
	dat.sort()
	res = []
	for i in range(n):
		res.append(dat[i])
		res.append(dat[-i - 1])
	print(' '.join(list(map(str, res))))
q = int(input())
for _ in range(q):
	do()


n = int(input())
for i in range(n):
	m = int(input())
	l = list(map(int, input().split()))
	l.sort()
	L = []
	for i in range(m):
		L.append(l[2 * i + 1])
		L.append(l[2 * i])
	if 2 * L[2 * m - 1] == L[2 * (m - 1)] + L[0]:
		a = L[0]
		L[0] = L[2 * m - 1]
		L[2 * m - 1] = a
	elif 2 * L[0] == L[1] + L[2 * m - 1]:
		a = L[0]
		L[0] = L[2 * m - 1]
		L[2 * m - 1] = a
	else:
		a = 1
	print(' '.join(list(map(str, L))))


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	x = len(a) - 1
	my_list = []
	for j in range(int(len(a) / 2)):
		my_list.append(a[j])
		my_list.append(a[x])
		x = x - 1
	for k in my_list:
		print(k, end=' ')
	print()


from sys import stdin, stderr
input = stdin.readline

def dbp(*args, **kwargs):
	print(*args, file=stderr, **kwargs)

def get_int_list():
	return [int(x) for x in input().strip().split()]

def do_thing():
	N = int(input())
	alist = get_int_list()
	assert len(alist) == 2 * N
	amax = 2 * N
	for i in range(4 * N):
		lidx = (i - 1) % amax
		ridx = (i + 1) % amax
		if alist[i % amax] == (alist[lidx] + alist[ridx]) / 2:
			nidx = (i + 2) % amax
			(alist[ridx], alist[nidx]) = (alist[nidx], alist[ridx])
	return ' '.join((str(a) for a in alist))

def multicase():
	maxcc = int(input().strip())
	for cc in range(maxcc):
		print(do_thing())
multicase()


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	while arr:
		print(arr[0], end=' ')
		print(arr[-1], end=' ')
		arr.pop()
		arr.pop(0)
	print()


from sys import *
ws = lambda : map(int, stdin.readline().strip().split())
li = lambda : list(map(int, stdin.readline().strip().split()))
mod = 1000000007

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def prod(l):
	ans = 1
	for i in range(len(l)):
		ans = ans * l[i]
	return ans

def sortindex(l, a):
	c = []
	if a == -1:
		rev = True
	else:
		rev = False
	for i in range(len(l)):
		c.append([l[i], i])
	x = sorted(c, reverse=rev)
	print(x)
	c = []
	for i in range(len(l)):
		c.append(x[i][1])
	return c
for _ in range(int(input())):
	a = stdin.readline().strip()
	a = int(a)
	l = li()
	l.sort()
	if a == 1:
		l.reverse()
		print(*l)
	else:
		for i in range(a - 1):
			(l[2 * i + 1], l[2 * i]) = (l[2 * i], l[2 * i + 1])
		(l[-1], l[0]) = (l[0], l[-1])
		print(*l)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	l = []
	a.sort()
	for j in range(n):
		l.append(a[j])
		l.append(a[j + n])
	string = [str(k) for k in l]
	ans = ' '.join(string)
	print(ans)


for _ in range(int(input())):
	n = int(input())
	L = list(map(int, input().split()))
	L.sort()
	res = []
	for i in range(n):
		res.append(L[i])
		res.append(L[2 * n - i - 1])
	for x in res:
		print(x, end=' ')
	print()


t = int(input())
for tc in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	l2 = []
	for x in range(n):
		l2.append(l[x])
		l2.append(l[x + n])
	print(*l2)


from collections import deque
import heapq
from math import sqrt
import operator
from operator import itemgetter
import sys
import copy
inf_var = 0
if inf_var == 1:
	inf = open('input.txt', 'r')
else:
	inf = sys.stdin
input = inf.readline

def read_one_int():
	return int(input().rstrip('\n'))

def read_one_float():
	return float(input().rstrip('\n'))

def read_list_of_ints():
	res = [int(val) for val in input().rstrip('\n').split()]
	return res

def read_list_of_ints_zero():
	return [int(val) - 1 for val in input().rstrip('\n').split()]

def read_str():
	return input().rstrip()

def find_perm(n, elements):
	res = []
	elements.sort()
	for i in range(n):
		res.append(elements[i])
		res.append(elements[2 * n - i - 1])
	print(' '.join(map(str, res)))

def main():
	tests = read_one_int()
	for _ in range(tests):
		n = read_one_int()
		elements = read_list_of_ints()
		find_perm(n, elements)
main()


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
MOD = 10 ** 9 + 7
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def main():
	for _ in range(int(input())):
		n = int(input())
		a = [*map(int, input().split())]
		a.sort()
		b = a[n:]
		a = a[:n]
		for i in range(n):
			print(a[i], b[i], end=' ')
		print()
main()


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	f = 0
	s = n
	for i in range(0, 2 * n):
		if i % 2 != 0:
			print(arr[f], end=' ')
			f += 1
		else:
			print(arr[s], end=' ')
			s += 1
	print('')


n = int(input())
for i in range(n):
	x = int(input())
	a = sorted(list(map(int, input().split())))
	b = []
	c = []
	d = []
	for j in range(x):
		b.append(a[j])
		b.append(a[-j - 1])
	for k in b:
		if k not in c:
			c.append(k)
		else:
			d.append(k)
	print(*c)


t = int(input())
for i in range(t):
	n = int(input())
	ll = [int(x) for x in input().split(' ')]
	ll.sort()
	l = [str(x) for x in ll]
	if n >= 2:
		l1 = []
		for j in range(n):
			l1.append(l[j])
			l1.append(l[j + n])
		print(' '.join(l1))
	else:
		print(' '.join(l))


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	y = []
	for x in zip(a[n:], a[:n]):
		y += [x[0], x[1]]
	print(*y)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	temp = []
	j = 0
	k = 2 * n - 1
	for i in range(2 * n):
		if i % 2 == 0:
			temp.append(str(arr[j]))
			j += 1
		else:
			temp.append(str(arr[k]))
			k -= 1
	print(' '.join(temp))


import math
t = int(input())

def solve(a):
	n = len(a) // 2
	a.sort()
	b = [0] * 2 * n
	b[1::2] = a[n:]
	b[::2] = a[:n]
	return b
for test in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	b = solve(a)
	print(' '.join([str(x) for x in b]))


from collections import defaultdict
from itertools import accumulate
from bisect import bisect_left
from collections import deque
from collections import Counter
import sys
input = sys.stdin.readline
inf = 100000000000000000
mod = 998244353
from itertools import permutations
for CASES in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	A = sorted(A)
	for i in range(2, n * 2 + 1):
		j = i
		while A[j - 1 - 1] + A[(j + 1 - 1) % (2 * n)] == A[j - 1] * 2:
			(A[j % (2 * n)], A[j - 1]) = (A[j - 1], A[j % (2 * n)])
			j -= 1
			if j < 0:
				j = j + n * 2
	print(*A)


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	arr.sort()
	l = []
	i = 0
	j = 2 * n - 1
	while i < j:
		l.append(arr[i])
		l.append(arr[j])
		i = i + 1
		j = j - 1
	for k in l:
		print(k, end=' ')


def solveq1():
	n = int(input())
	arr = sorted([int(x) for x in input().split()])
	changed = True
	while changed:
		changed = False
		for i in range(len(arr) - 2):
			if arr[i + 1] == (arr[i] + arr[i + 2]) / 2:
				changed = True
				(arr[i + 1], arr[i]) = (arr[i], arr[i + 1])
	print(' '.join([str(x) for x in arr]))
for tc in range(int(input())):
	solveq1()


def solve():
	tc = int(input())
	while tc:
		n = int(input())
		arr = sorted(list(map(int, input().strip().split())))
		m = int(len(arr) / 2)
		for i in range(m):
			print(arr[i], end=' ')
			print(arr[m + i], end=' ')
		print()
		tc -= 1
	return
solve()


t = int(input())
for _ in range(t):
	n = int(input())
	a = sorted(map(int, input().split()))
	b = list(zip([a[i] for i in range(n)], [a[i] for i in range(n, n + n)]))
	c = ' '.join(map(lambda x: f'{str(x[0])} {str(x[1])}', b))
	print(c)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	ans = [0] * 2 * n
	for i in range(n):
		ans[2 * i] = a[i]
	for i in range(n):
		ans[2 * (i + 1) - 1] = a[n + i]
	print(*ans)


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	a = [int(k) for k in input().split(' ')]
	a.sort()
	b = [0 for i in range(2 * n)]
	x = 0
	y = 2 * n - 1
	for i in range(0, 2 * n):
		if i % 2 == 0:
			b[i] = a[x]
			x += 1
		else:
			b[i] = a[y]
			y -= 1
	for i in range(0, 2 * n):
		print(b[i], end=' ')
	print('\n')


for _ in range(int(input())):
	n = int(input())
	l = sorted(list(map(int, input().split())), reverse=True)
	ans = [0] * (2 * n)
	for (i, j) in enumerate(l):
		if i < n:
			ans[2 * i + 1] = j
		else:
			x = n - i
			ans[2 * x] = j
	print(*ans)


def solve(l):
	l.sort()
	arr1 = l[:int(len(l) / 2)]
	arr2 = l[int(len(l) / 2):]
	j = 0
	for i in range(1, len(l), 2):
		arr1.insert(i, arr2[j])
		j += 1
	return ' '.join(list(map(str, arr1)))
t = int(input())
for _ in range(1, t + 1):
	n = int(input())
	arr = list(map(int, input().split()))
	print(solve(arr))


answers = []

def solve(n, arr):
	if n == 1:
		answers.append(arr)
		return
	arr.sort()
	start = 0
	end = 2 * n - 1
	final = []
	while start < end:
		final.append(arr[end])
		final.append(arr[start])
		start += 1
		end -= 1
	if start == end:
		final.append(arr[start])
	answers.append(final)
T = int(input())
while T:
	n = int(input())
	arr = [int(x) for x in input().split()]
	solve(n, arr)
	T -= 1
for ans in answers:
	print(*ans)


from sys import *
from math import *
from sys import stdin, stdout
from collections import *
int_arr = lambda : list(map(int, stdin.readline().strip().split()))
str_arr = lambda : list(map(str, stdin.readline().split()))
get_str = lambda : map(str, stdin.readline().strip().split())
get_int = lambda : map(int, stdin.readline().strip().split())
get_float = lambda : map(float, stdin.readline().strip().split())
mod = 1000000007
setrecursionlimit(1000)

def ans(n, arr):
	n = 2 * n
	(l, r) = (0, n - 1)
	lst = []
	arr.sort()
	while l < r:
		lst.append(arr[l])
		lst.append(arr[r])
		l += 1
		r -= 1
	print(*lst)
for _ in range(int(input())):
	n = int(input())
	arr = int_arr()
	ans(n, arr)


import sys

def solve():
	sys.stdin.readline()
	arr = sys.stdin.readline().rstrip('\n').split(' ')
	arr = [int(_) for _ in arr]
	arr.sort()
	l = 0
	r = len(arr) - 1
	res = []
	while l < r:
		res.append(arr[l])
		res.append(arr[r])
		l += 1
		r -= 1
	p = ''
	for x in res:
		p += str(x)
		p += ' '
	print(p)
T = int(sys.stdin.readline().rstrip('\n'))
while T > 0:
	solve()
	T -= 1


t = int(input(''))
for i in range(t):
	n = int(input(''))
	a = list(map(int, input('').split()))
	a.sort()
	d = a[0:n:1]
	b = a[n:]
	i = 0
	v = []
	while i < n:
		v.append(b[i])
		v.append(d[i])
		i += 1
	print(' '.join(map(str, v)))


for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	b = []
	a.sort()
	for i in range(n):
		b.append(a[i])
		b.append(a[-i - 1])
	print(*b)


n = input()
r = []
for i in range(int(n)):
	nn = int(input())
	intr = input().split()
	intr = list(map(int, intr))
	intr.sort()
	intr.reverse()
	re = []
	(m, n) = (0, 2 * nn - 1)
	while m < n:
		re.append(str(intr[m]))
		re.append(str(intr[n]))
		m += 1
		n -= 1
	d = ' '.join(re)
	r.append(d)
for i in r:
	print(i)


import math
from itertools import combinations as cb
from itertools import permutations as pr
from collections import defaultdict as df
from collections import deque as dq
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	b = []
	m = 2 * n
	c = a[:n]
	d = a[n:]
	i = 0
	j = 0
	for k in range(n):
		b.append(c[i])
		i += 1
		b.append(d[j])
		j += 1
	print(*b, sep=' ')


for _ in range(int(input())):
	n = int(input())
	a = [int(y) for y in input().split()]
	a.sort()
	b = []
	for i in range(n):
		b.append(a[i])
		b.append(a[-i - 1])
	ans = ''
	for i in b:
		ans += str(i) + ' '
	print(ans[:-1])


for _ in range(int(input())):
	x = int(input())
	l = sorted(list(map(int, input().split())))
	for i in range(x):
		print(l[i], l[2 * x - 1 - i], end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	ar = list(map(int, input().split()))
	ar = sorted(ar)
	for i in range(2, len(ar)):
		if i % 2 == 0:
			(ar[i], ar[i - 1]) = (ar[i - 1], ar[i])
	print(' '.join(map(str, ar)))


tt = int(input())
for _ in range(tt):
	n = int(input())
	ans = []
	a = sorted(list(map(int, input().split())))
	l = a[:n]
	r = a[n:]
	r = r[::-1]
	for i in range(n):
		ans.append(l[i])
		ans.append(r[i])
	for j in ans:
		print(j, end=' ')
	print()