You are given an array $a_1, a_2, \dots , a_n$. Array is good if for each pair of indexes $i < j$ the condition $j - a_j \ne i - a_i$ holds. Can you shuffle this array so that it becomes good? To shuffle an array means to reorder its elements arbitrarily (leaving the initial order is also an option).

For example, if $a = [1, 1, 3, 5]$, then shuffled arrays $[1, 3, 5, 1]$, $[3, 5, 1, 1]$ and $[5, 3, 1, 1]$ are good, but shuffled arrays $[3, 1, 5, 1]$, $[1, 1, 3, 5]$ and $[1, 1, 5, 3]$ aren't.

It's guaranteed that it's always possible to shuffle an array to meet this condition.


-----Input-----

The first line contains one integer $t$ ($1 \le t \le 100$) — the number of test cases.

The first line of each test case contains one integer $n$ ($1 \le n \le 100$) — the length of array $a$.

The second line of each test case contains $n$ integers $a_1, a_2, \dots , a_n$ ($1 \le a_i \le 100$).


-----Output-----

For each test case print the shuffled version of the array $a$ which is good.


-----Example-----
Input
3
1
7
4
1 1 3 5
6
3 2 1 5 6 4

Output
7
1 5 1 3
2 4 6 1 3 5

Difficulty: EASY

Solutions:
I = lambda : list(map(int, input().split()))
for _ in range(int(input())):
	I()
	l = I()
	print(' '.join(map(str, sorted(l, reverse=True))))


def shuffle(array):
	return list(sorted(array, reverse=True))
test_cases = int(input())
for _ in range(test_cases):
	input()
	array = [int(x) for x in input().split()]
	result = shuffle(array)
	print(' '.join([str(x) for x in result]))


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


for i in range(int(input())):
	input()
	a = map(int, input().split())
	print(*sorted(a, reverse=True))


def randomize(arr, n):
	arr = sorted(arr, reverse=True)
	return arr
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		print(*a)
	else:
		print(*randomize(a, n))


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	print(' '.join(map(str, sorted(a, reverse=True))))


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort(reverse=True)
	arr = list(map(str, arr))
	print(' '.join(arr))


for _ in range(int(input())):
	lens = int(input())
	arrs = [int(x) for x in input().split()]
	print(*sorted(arrs, reverse=True))


t = int(input())
for i in range(t):
	n = int(input())
	mas = list(map(int, input().split()))
	mas.sort()
	mas.reverse()
	print(*mas)


for p in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	print(*a)


import sys, collections
tc = int(sys.stdin.readline())
for _ in range(tc):
	n = int(sys.stdin.readline())
	arr = list(map(int, sys.stdin.readline().split()))
	arr.sort(reverse=True)
	print(' '.join(map(str, arr)))


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	print(*l)


for tc in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	print(*l)


t = int(input())
for k in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	print(*a)


from math import gcd, ceil
from collections import defaultdict as dd

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

def inin():
	return int(input())

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

def ar(element, size):
	return [element for i in range(size)]

def digitsum(num):
	su = 0
	while num:
		su += num % 10
		num //= 10
	return su

def pred(n, k, pointer):
	return pointer - k >= n

def yes():
	print('YES')

def no():
	print('NO')
for _ in range(inin()):
	n = inin()
	arr = inar()
	arr.sort(reverse=True)
	print(*arr)


import sys
import math

def read_line():
	return sys.stdin.readline()[:-1]

def read_int():
	return int(sys.stdin.readline())

def read_int_line():
	return [int(v) for v in sys.stdin.readline().split()]
t = read_int()
for i in range(t):
	n = read_int()
	a = read_int_line()
	a.sort(reverse=True)
	print(*a)


for t in range(int(input())):
	n = input()
	print(*sorted(map(int, input().split()), reverse=True))


t = int(input())
for _ in range(t):
	n = int(input())
	a = sorted(map(int, input().split()))
	print(*reversed(a))


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	l.reverse()
	print(*l)


for _ in range(int(input())):
	size = input()
	print(' '.join((str(x) for x in sorted(map(int, input().split()), reverse=True))))


import sys
reader = (line.rstrip() for line in sys.stdin)
input = reader.__next__
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	print(*a)


for t in range(int(input())):
	n = int(input())
	l = [int(j) for j in input().split()]
	l.sort(reverse=True)
	print(' '.join(map(str, l)))


for _ in range(int(input())):
	n = int(input())
	arr = [int(c) for c in input().split()]
	arr.sort(reverse=True)
	print(*arr)


import sys
import bisect
import heapq
from math import *
from collections import defaultdict as dd
from collections import deque
from collections import Counter as c
from itertools import combinations as comb
from bisect import bisect_left as bl, bisect_right as br, bisect
mod = pow(10, 9) + 7
mod2 = 998244353

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

def out(var):
	sys.stdout.write(var)

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

def sl():
	return list(map(str, data().split()))

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [[val for i in range(n)] for j in range(m)]
for _ in range(int(data())):
	n = int(data())
	arr = l()
	arr.sort()
	arr = arr[::-1]
	print(*arr)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a = list(sorted(a))
	a = list(reversed(a))
	print(' '.join(list(map(str, a))))


from sys import stdin
from collections import Counter
T = int(input())
for _ in range(T):
	(n,) = map(int, stdin.readline().split())
	a = list(map(int, stdin.readline().split()))
	a.sort(reverse=True)
	print(' '.join(map(str, a)))


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


for i in range(int(input())):
	am = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	arr.reverse()
	print(*arr)


t = int(input())
for tt in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l = list(reversed(sorted(l)))
	print(*l)


t = int(input())
for tt in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	a = a[::-1]
	print(*a)


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	print(' '.join(map(str, a)))


t = int(input())
while t:
	t -= 1
	n = int(input())
	x = list(map(int, input().split()))
	x.sort(reverse=True)
	print(*x)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().strip().split(' ')))
	a.sort(reverse=True)
	print(*a)


t = int(input())
while t != 0:
	n = int(input())
	arr = [int(x) for x in input().split()]
	brr = [0 for i in range(len(arr))]
	if len(arr) == 1:
		print(*arr)
	else:
		start = 0
		end = n - 1
		arr.sort(reverse=True)
		print(*arr)
	t = t - 1


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	w = sorted(l)
	l1 = []
	for j in range(n - 1, -1, -1):
		l1.append(w[j])
	print(*l1)


import os, sys, bisect, copy
from collections import defaultdict, Counter, deque
from functools import lru_cache
if os.path.exists('in.txt'):
	sys.stdin = open('in.txt', 'r')
if os.path.exists('out.txt'):
	sys.stdout = open('out.txt', 'w')

def input():
	return sys.stdin.readline()

def mapi(arg=0):
	return map(int if arg == 0 else str, input().split())
for _ in range(int(input())):
	n = int(input())
	a = list(mapi())
	a.sort(reverse=True)
	print(*a)


n = int(input())
for i in range(n):
	input()
	a = [int(x) for x in input().split()]
	print(' '.join(map(str, sorted(a, reverse=True))))


for _ in range(int(input())):
	n = int(input())
	a = [*map(int, input().split())]
	a.sort(reverse=True)
	print(*a)


tc = int(input())
while tc:
	n = int(input())
	m = list(map(int, input().split()))
	m.sort(reverse=True)
	print(*m, sep=' ')
	tc -= 1


t = int(input())
N = list()
A = list()
for _ in range(t):
	N.append(int(input()))
	A.append(list(map(int, input().split())))
for a in A:
	a.sort(reverse=True)
	print(*a)


def solve(n, a):
	return ' '.join(map(str, sorted(a)[::-1]))

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = [int(i) for i in input().split()]
		print(solve(n, a))
main()


t = int(input())
for test in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort(reverse=True)
	print(*arr)


def get(*arg):
	if arg[0] == 0:
		cnt = int(input())
		flag = 1
	else:
		cnt = 1
		flag = 0
	lst = list()
	for i in range(cnt):
		lst2 = list()
		for ii in range(len(arg) - flag):
			if arg[ii + flag] == 1:
				t = input().split()
				tmp = list()
				for iii in t:
					tmp.append(int(iii))
			elif arg[ii + flag] == 2:
				tmp = input().split()
			else:
				tmp = input()
			lst2.append(tmp)
		lst.append(lst2)
	return lst
a = get(0, 1, 1)
for i in a:
	b = sorted(i[1], reverse=True)
	print(*b)


test_cases = int(input())
for test in range(test_cases):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	arr.reverse()
	print(*arr, sep=' ')


for t in range(int(input())):
	_ = int(input())
	a = list(map(int, input().split()))
	a.sort()
	a = a[::-1]
	print(*a)


T = int(input())
for _ in range(T):
	S = int(input())
	print(*sorted([int(x) for x in input().split()], reverse=True))


t = int(input())
for i in range(t):
	n = int(input())
	ai = list(map(int, input().split()))
	ai.sort(reverse=True)
	print(' '.join(list(map(str, ai))))


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


import sys, math
input = sys.stdin.readline

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

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

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

def invr():
	return map(int, input().split())
t = 1
t = inp()
for tt in range(t):
	n = inp()
	a = inlt()
	a.sort()
	a.reverse()
	print(*a)


for k in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	a.reverse()
	print(*a)


t = int(input())
for _ in range(t):
	n = int(input())
	a = sorted([int(x) for x in input().split()])
	a.reverse()
	print(*a)


read = lambda : list(map(int, input().split(' ')))
for _ in range(int(input())):
	n = int(input())
	arr = read()
	arr.sort(reverse=True)
	print(*arr)


import sys
from collections import Counter

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

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

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

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

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
for _ in range(INT()):
	N = INT()
	A = LIST()
	A.sort(reverse=1)
	print(*A)


n = int(input())
for i in range(n):
	f = int(input())
	a = list(map(int, input().strip().split()))
	i = 0
	k = sorted(a)
	p = []
	for i in range(len(a) - 1, -1, -1):
		p.append(k[i])
	print(*p)


def resh():
	n = int(input())
	mas = list(map(int, input().split()))
	print(*reversed(sorted(mas)))
t = int(input())
for i in range(t):
	resh()


cases = int(input())
for i in range(cases):
	n = int(input())
	line2 = input().split(' ')
	arr = []
	for a in line2:
		arr.append(int(a))
	arr.sort(reverse=True)
	sol = []
	for a in arr:
		sol.append(str(a))
	print(' '.join(sol))


n = int(input())
for i in range(n):
	input()
	print(*sorted(list(map(int, input().split())), reverse=True))


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


n = int(input())
for __ in range(n):
	input()
	data = list(map(int, input().split()))
	data.sort(reverse=True)
	for a in data[:-1]:
		print(a, end=' ')
	print(data[-1])


t = int(input())
for v in range(t):
	n = int(input())
	x = [int(q) for q in input().split()]
	print(*sorted(x)[::-1])


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	print(*reversed(sorted(arr)))


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
import random
from queue import PriorityQueue
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

def ncr(x, y):
	return f(x) // (f(y) * f(x - y))
from collections import defaultdict
from heapq import heappop, heappush, heapify
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	print(*l)


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort(reverse=True)
	print(*arr, sep=' ')


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


from collections import defaultdict
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a, reverse=True)
	print(*a)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	a = sorted(map(int, input().split()), reverse=True)
	print(*a)


from sys import stdin, stdout
from math import *
import math, random, operator
from itertools import product, permutations, combinations
from collections import deque, defaultdict, Counter

def hi():
	n = int(input())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	print(*l)
for _ in range(int(input())):
	hi()


i = input
exec(int(i()) * 'i();print(*sorted(i().split(),key=int)[::-1]);')


t = int(input())
for i in range(t):
	n = int(input())
	a = input().split(' ')
	a.sort(reverse=True, key=int)
	print(' '.join([k for k in a]))


for _ in range(int(input())):
	a = int(input())
	b = list(map(int, input().split()))
	b = sorted(b, reverse=True)
	print(*b)


def main_function():
	input_data = [[int(input()), [int(j) for j in input().split(' ')]] for i in range(int(input()))]
	for i in input_data:
		(n, a) = i
		print(' '.join([str(i) for i in sorted(a, reverse=True)]))
main_function()


t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(i) for i in input().split()]
	arr.sort(reverse=True)
	print(*arr)


for i in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort(reverse=True)
	print(*arr)


for i in range(int(input())):
	k = int(input())
	a = list(map(int, input().split()))
	a.sort()
	a = a[::-1]
	a = ' '.join((str(i) for i in a))
	print(a)


t = int(input())
for _ in range(t):
	n = int(input())
	As = list(map(int, input().split()))
	print(' '.join(map(str, sorted(As, reverse=True))))


import sys
from sys import stdout, stdin
import math

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

def iinput():
	return int(input())

def rinput():
	return input().split()

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

def main():
	n = iinput()
	print(*sorted(rlinput(), reverse=True))
for i in range(iinput()):
	main()


for _ in range(int(input())):
	n = int(input())
	a = sorted(map(int, input().split()))
	print(*a[::-1])


def main():
	t = int(input())
	for i in range(0, t):
		input()
		vetor = [int(j) for j in input().split()]
		vetor.sort(reverse=True)
		printa(vetor)

def printa(v):
	for i in range(len(v)):
		if i == len(v) - 1:
			print(v[i])
		else:
			print(v[i], end=' ')
main()


from math import factorial
from collections import Counter, defaultdict
from heapq import heapify, heappop, heappush
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().rstrip().split())

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

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)
mod = 1000000007
INF = float('inf')

def main():
	t = N()
	for _ in range(t):
		n = N()
		arr = list(RL())
		arr.sort(reverse=1)
		print(*arr)
main()


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


for _ in range(int(input())):
	a = int(input())
	b = list(sorted(map(int, input().split())))
	print(*b[::-1])


from collections import *
for i in range(int(input())):
	(n, a) = (int(input()), list(map(int, input().split())))
	print(*sorted(a, reverse=True))


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


testCases = int(input())
for i in range(testCases):
	length = int(input())
	array = [int(i) for i in input().split()]
	array.sort(reverse=True)
	print(*array)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(item) for item in input().split()]
	a.sort(reverse=True)
	print(*a)


t = int(input())
for _ in range(t):
	n = int(input())
	num = list(map(int, input().split()))
	num.sort()
	num = num[::-1]
	num = list(map(str, num))
	print(' '.join(num))


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		print(*a)
	else:
		a = sorted(a)[::-1]
		print(*a)


t = int(input())
for i in range(t):
	n = int(input())
	print(*sorted(list(map(int, input().split())))[::-1])


t = int(input())
while t:
	t -= 1
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort(reverse=True)
	print(*a)


n = int(input())
for x in range(n):
	l = int(input())
	arr = list(map(int, input().split(' ')))
	arr.sort()
	arr.reverse()
	print(' '.join((str(x) for x in arr)))


res = []
for _ in range(int(input())):
	n = int(input())
	l = [*map(int, input().split())]
	l.sort()
	l.reverse()
	res.append(' '.join(map(str, l)))
print(*res, sep='\n')


tc = int(input())
for _ in range(tc):
	n = int(input())
	(*arr,) = map(int, input().split())
	print(*sorted(arr, reverse=True))


for i in range(int(input())):
	n = int(input())
	arr = [int(i) for i in input().split(' ')]
	arr.sort(reverse=True)
	print(' '.join([str(i) for i in arr]))


t = int(input())
for i in range(t):
	n = int(input())
	array = [int(x) for x in input().split()]
	array.sort(reverse=True)
	print(*array)


z = input
mod = 10 ** 9 + 7
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)
for _ in range(int(z())):
	x = int(z())
	l = sorted(list(map(int, z().split())))[::-1]
	print(*l)


import math

def check(k, h, c):
	return ((k + 1) * h + k * c) / (2 * k + 1)

def main():
	n = int(input())
	a = list(map(int, input().split()))
	add = sum(a)
	a.sort(reverse=True)
	print(*a)
	return

def test():
	t = int(input())
	while t:
		main()
		t -= 1
test()


from sys import stdin, stdout
import traceback
read = stdin.readline
write = stdout.write
writeln = lambda x: write(str(x) + '\n')

def reads(typ=int):
	return list(map(typ, read().split()))

class Sol:

	@classmethod
	def input(cls):
		s = cls()
		return s

	def solve(self):
		n = read()
		aa = reads()
		aa = sorted(aa, reverse=True)
		return aa
try:
	for _ in range(int(read())):
		r = [str(a) for a in Sol.input().solve()]
		writeln(' '.join(r))
except Exception as e:
	print('Got exception:', repr(e))
	print(traceback.format_exc())


from math import ceil, sqrt, floor
import sys
n = int(input())
for i in range(n):
	_ = input()
	print(*sorted(list(map(int, input().split())), reverse=1))


l = int(input())
for _ in range(l):
	input()
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	a = list(map(str, a))
	print(' '.join(a))


for _ in range(int(input())):
	print(*reversed(sorted([map(int, input().split()) for i in 'aa'][1])))


def twopoly(m, n):
	if m % n == 0:
		return 'YES'
	else:
		return 'NO'

def bogosort(x):
	x.sort(reverse=True)
	return x
cases = int(input())
for _ in range(cases):
	l = int(input())
	x = list(map(int, input().split()))
	y = bogosort(x)
	print(*y)


import math, collections, sys, random
input = sys.stdin.readline

def solve():
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	print(*a)
for _ in range(int(input())):
	solve()


def ii():
	return int(input())

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

def ai():
	return list(map(int, input().split()))
for _ in range(ii()):
	n = ii()
	lst = ai()
	lst.sort(reverse=True)
	print(*lst)


import os
import sys
import math
from io import BytesIO, IOBase
input = sys.stdin.readline

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())

def dijkstra(start, distance, path, n):
	visited = [False for _ in range(n)]
	distance[start] = 0
	for i in range(n):
		v = -1
		for j in range(n):
			if not visited[v] and (v == -1 or distance[j] < distance[v]):
				v = j
		if distance[v] == math.inf:
			break
		visited[v] = True
		for edge in adj[v]:
			destination = edge[0]
			weight = edge[1]
			if distance[v] + weight < distance[destination]:
				distance[destination] = distance[v] + weight
				path[destination] = v

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

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

def ncr(n, r):
	return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def npr(n, r):
	return math.factorial(n) // math.factorial(n - r)

def seive(n):
	primes = [True] * (n + 1)
	ans = []
	for i in range(2, n):
		if not primes[i]:
			continue
		j = 2 * i
		while j <= n:
			primes[j] = False
			j += i
	for p in range(2, n + 1):
		if primes[p]:
			ans += [p]
	return ans

def factors(n):
	factors = []
	x = 1
	while x * x <= n:
		if n % x == 0:
			if n // x == x:
				factors.append(x)
			else:
				factors.append(x)
				factors.append(n // x)
		x += 1
	return factors

def main():
	try:
		for _ in range(inp()):
			n = inp()
			a = inlt()
			print(*sorted(a, reverse=True), sep=' ')
	except Exception as e:
		print(e)
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')
main()


import sys
input = sys.stdin.readline
Q = int(input())
Query = []
for _ in range(Q):
	N = int(input())
	A = list(map(int, input().split()))
	Query.append((N, A))
for (N, A) in Query:
	A.sort(reverse=True)
	print(*A)


for _ in range(int(input())):
	t = int(input())
	q = [int(x) for x in input().split()]
	q.sort(reverse=True)
	print(*q)


import sys
sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.readline())

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

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

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]

def main():
	t = II()
	for _ in range(t):
		II()
		aa = LI()
		aa.sort(reverse=True)
		print(*aa)
main()


for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	A.sort(reverse=True)
	print(*A)


def solve():
	n = int(input())
	lst = list(map(int, input().split()))
	lst.sort(reverse=True)
	print(*lst)
for i in range(int(input())):
	solve()


T = int(input())
for _ in range(T):
	n = int(input())
	lt = list(map(int, input().split()))
	for i in range(n):
		while i > 0:
			cur = i - lt[i]
			prev = i - 1 - lt[i - 1]
			if prev >= cur:
				(lt[i], lt[i - 1]) = (lt[i - 1], lt[i])
				i -= 1
			else:
				break
	print(*lt)


arrays = []
for _ in range(int(input())):
	mlen = int(input())
	arrays.append([int(x) for x in input().split()])
for arr in arrays:
	arr.sort(reverse=True)
for arr in arrays:
	print(' '.join([str(s) for s in arr]))


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	a = a[::-1]
	print(' '.join((str(x) for x in a)))


for _ in range(int(input())):
	n = int(input())
	print(' '.join(map(str, sorted((int(x) for x in input().split()))[::-1])))


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	print(*sorted(a, reverse=True), sep=' ')


import sys
input = sys.stdin.readline
from math import *
t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	a = [int(x) for x in input().split()]
	print(*sorted(a, reverse=True))


import sys

def ints():
	return list(map(int, sys.stdin.readline().strip().split()))
tc = int(input())
while tc:
	tc -= 1
	n = int(input())
	n *= 2
	ls = ints()
	ls.sort(reverse=True)
	print(*ls)


from functools import reduce
from itertools import combinations
import sys
import math

class Read:

	@staticmethod
	def string():
		return input()

	@staticmethod
	def int():
		return int(input())

	@staticmethod
	def list(delimiter=' '):
		return input().split(delimiter)

	@staticmethod
	def list_int(delimiter=' '):
		return list(map(int, input().split(delimiter)))

def main():
	t = Read.int()
	for _ in range(t):
		n = Read.int()
		a = Read.list_int()
		print(*sorted(a)[::-1])
main()


def sort(lista):
	ordenada = []
	for i in range(len(lista)):
		maior = max(lista)
		ordenada.append(maior)
		lista.remove(maior)
	return ordenada
n = int(input())
for i in range(n):
	x = int(input())
	lista = list(map(int, input().split(' ')))
	lista.sort()
	lista.reverse()
	print(' '.join((str(x) for x in lista)))


import random

def is_sorted(aList):
	diff = 0 - aList[0]
	for i in range(1, len(aList)):
		if i - aList[i] == diff:
			return False
	return True

def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		a.sort()
		a = reversed(a)
		print(*a)
main()


x = int(input())
for i in range(x):
	a = int(input())
	valores = list(map(int, input().split(' ')))
	valores.sort(key=int, reverse=True)
	valores = list(map(str, valores))
	print(' '.join(valores))


for i in range(int(input().strip())):
	t = int(input().strip())
	m = input().strip().split()
	m = [int(i) for i in m]
	m.sort(key=lambda f: -f)
	print(' '.join([str(i) for i in m]))


import math
import operator

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

def nCr(n, r):
	return math.factorial(n) / (math.factorial(r) * math.factorial(n - r))

def isKthBitSet(n, k):
	if n & 1 << k - 1:
		return True
	else:
		return False

def maximalRectangle(matrix):
	if not matrix or not matrix[0]:
		return 0
	n = len(matrix[0])
	height = [0] * (n + 1)
	ans = 0
	for row in matrix:
		for i in range(n):
			height[i] = height[i] + 1 if row[i] == '0' else 0
		stack = [-1]
		for i in range(n + 1):
			while height[i] < height[stack[-1]]:
				h = height[stack.pop()]
				w = i - 1 - stack[-1]
				ans = max(ans, h * w)
			stack.append(i)
	return ans

def matched(str):
	count = 0
	for i in str:
		if i == '(':
			count += 1
		elif i == ')':
			count -= 1
		if count < 0:
			return False
	return count == 0

def isValid(h, m, nh, nm):
	l = [0, 1, 5, -1, -1, 2, -1, -1, 8, -1]
	if l[h // 10] == -1 or l[h % 10] == -1 or l[m // 10] == -1 or (l[m % 10] == -1):
		return False
	resh = l[m % 10] * 10 + l[m // 10]
	resm = l[h % 10] * 10 + l[h // 10]
	return resh < nh and resm < nm

def solve():
	n = int(input())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	print(*l)
t = int(input())
while t > 0:
	t -= 1
	solve()


for item in [0] * int(input()):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	print(' '.join((str(ele) for ele in a)))


def is_good(A):
	return all((j - b != i - a for (i, a) in enumerate(A) for (j, b) in enumerate(A[i + 1:], i + 1)))

def solve(n, A):
	A.sort(reverse=True)
	return A
t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	r = solve(n, A)
	print(' '.join(map(str, r)))


t = int(input())
for i in range(t):
	n = int(input())
	li = [int(num) for num in input().split(' ', n - 1)]
	li.sort()
	li = li[::-1]
	print(*li)


for _ in range(0, int(input())):
	input()
	print(*sorted(list(map(int, input().split())), reverse=True))


for t in range(int(input())):
	n = int(input())
	L = [int(X) for X in input().split()]
	L.sort()
	L.reverse()
	for i in range(n):
		if i == n - 1:
			print(L[i])
		else:
			print(L[i], end=' ')


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


from pprint import pprint
t = int(input())
for _ in range(t):
	n = int(input())
	dat = list(map(int, input().split()))
	dat.sort(reverse=True)
	print(' '.join(list(map(str, dat))))


a = []
t = int(input())
for i in range(t):
	n = int(input())
	g = input().split(' ')
	a.append([int(x) for x in g])
	pr = sorted(a[i], reverse=True)
	print(' '.join([str(i) for i in pr]))


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(o) for o in input().split()]
	print(*sorted(a, reverse=True))


from math import *

def swap(x, y, a):
	t = a[x]
	a[x] = a[y]
	a[y] = t
zzz = int(input())
for zz in range(zzz):
	n = int(input())
	a = [int(i) for i in input().split()]
	print(' '.join(map(str, sorted(a, reverse=True))))


from sys import stdin

def func():
	return
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	arr = sorted(list(map(int, stdin.readline().split())), reverse=True)
	print(*arr)


t = int(input())
for _ in range(t):

	def solve():
		n = int(input())
		print(*sorted(map(int, input().split()))[::-1])
	solve()


N = int(input())
for i in range(N):
	b = int(input())
	a = list(map(int, input().split()[:b]))
	print(*sorted(a)[::-1])


t = int(input())
for _ in range(t):
	N = int(input())
	X = list(map(int, input().split()))
	X.sort()
	X = X[::-1]
	print(*X)


from math import ceil, sqrt, gcd, log, floor
from collections import deque

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def li():
	return list(mi())
for _ in range(ii()):
	n = ii()
	a = li()
	b = a[:]
	a.sort(reverse=True)
	print(*a)


import sys
from sys import stdin, stdout
import bisect
import math
import heapq

def modinv(n, p):
	return pow(n, p - 2, p)

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())
import math

def main():
	tt = inin()
	for _ in range(tt):
		n = inin()
		a = ain()
		a.sort(reverse=True)
		print(*a)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

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

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			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')
import sys

class ostream:

	def __lshift__(self, a):
		sys.stdout.write(str(a))
		return self
cout = ostream()
endl = '\n'

def readnumbers(zero=0):
	conv = ord if py2 else lambda x: x
	A = []
	numb = zero
	sign = 1
	i = 0
	s = sys.stdin.buffer.read()
	try:
		while True:
			if s[i] >= b'0'[0]:
				numb = 10 * numb + conv(s[i]) - 48
			elif s[i] == b'-'[0]:
				sign = -1
			elif s[i] != b'\r'[0]:
				A.append(sign * numb)
				numb = zero
				sign = 1
			i += 1
	except:
		pass
	if s and s[-1] >= b'0'[0]:
		A.append(sign * numb)
	return A
main()


import sys
import math
import heapq
import collections

def inputnum():
	return int(input())

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

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

def inputstring():
	return [x for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
t = int(input())
for q in range(t):
	n = inputnum()
	a = inputlist()
	a.sort(reverse=True)
	print(*a)


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	a.reverse()
	print(*a)


exec(int(input()) * 'input();print(*sorted(map(int,input().split()))[::-1]);')


from sys import stdin, stdout
from collections import Counter
from itertools import permutations
import bisect
import math
I = lambda : map(int, stdin.readline().split())
I1 = lambda : stdin.readline()
for _ in range(int(I1())):
	n = int(I1())
	a = list(I())
	print(*sorted(a, reverse=True))


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(key=lambda x: -x)
	print(*a)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	print(*sorted(A, reverse=True))


for _ in range(int(input())):
	w = int(input())
	data = list(map(int, input().split()))
	data.sort(reverse=True)
	print(*data)


t = int(input())
for testcase in range(t):
	input()
	nums = list(map(int, input().split()))
	nums = sorted(nums, key=lambda x: -x)
	print(' '.join(map(str, nums)))


for _ in range(int(input())):
	n = int(input())
	array = sorted(list(map(int, input().split())), reverse=True)
	print(*array)


testCases = int(input())
for i1 in range(testCases):
	x = int(input())
	seq = list(map(int, input().split()))
	print(*reversed(sorted(seq)))


t = int(input())
while t > 0:
	n = int(input())
	A = [int(x) for x in input().split()]
	B = sorted(A, reverse=True)
	print(*B)
	t -= 1


for t in range(int(input())):
	n = int(input())
	a = sorted([int(i) for i in input().split()], reverse=True)
	print(*a, sep=' ')


t = int(input())
for j in range(t):
	n = input()
	a = list(map(int, input().split()))
	print(*sorted(a)[::-1])


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	print(*sorted(a, reverse=True))
t = int(input())
for i in range(t):
	solve()


from sys import stdin

def inp():
	return stdin.readline().strip()
t = int(inp())
for _ in range(t):
	n = int(inp())
	a = [int(x) for x in inp().split()]
	a.sort(reverse=True)
	print(*a)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	ans = sorted(arr, reverse=True)
	print(*ans)


number_of_tests = int(input())
length = []
array_of_arrays = []
for i in range(0, number_of_tests):
	l = int(input())
	length.append(l)
	array = list(map(int, input().split()))
	array_of_arrays.append(array)
for i in range(0, number_of_tests):
	array_of_arrays[i].sort()
	max = length[i]
	array = []
	for j in range(0, max):
		array.append(array_of_arrays[i][max - j - 1])
	print(*array)


from collections import deque
for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	A.sort()
	A = A[::-1]
	print(*A)


t = int(input())
for t1 in range(t):
	n = int(input())
	l = list(map(int, input().split(' ')))
	l.sort(reverse=True)
	print(str(l).replace('[', '').replace(']', '').replace(',', ''))


def solve():
	N = int(input())
	L = list(map(int, input().split()))
	print(*list(reversed(sorted(L))))
N = int(input())
for _ in range(N):
	solve()


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	arr = list(map(int, sys.stdin.readline().split()))
	arr.sort()
	arr.reverse()
	print(*arr)


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


import sys

def fastio():
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(*var, sep=' ', end='\n'):
	print(*var, file=sys.stderr, end=end, sep=sep)
INF = 10 ** 20
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br
(t,) = I()
for test in range(t):
	n = I()
	arr = I()
	arr = sorted(arr, reverse=True)
	print(*arr)


import math
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort(reverse=True)
	print(*arr)


import sys
from math import *
from collections import defaultdict
from queue import deque
from heapq import heappush, heappop
lines = [line.strip() for line in sys.stdin.readlines()]
t = int(lines[0])
for tt in range(t):
	n = int(lines[tt * 2 + 1])
	xs = list(map(int, lines[tt * 2 + 2].split()))
	xs.sort()
	xs.reverse()
	print(' '.join(map(str, xs)))


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_int = lambda : int(sys.stdin.readline())
for _ in range(get_int()):
	n = get_int()
	print(*sorted(get_int_list(), reverse=True))


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().strip().split()]
	a.sort(reverse=True)
	print(*a)


def main():
	for _ in range(int(input())):
		n = int(input())
		l = list(map(int, input().split(' ')))
		l.sort(reverse=True)
		print(*l)
main()


for i in range(int(input())):
	n = int(input())
	lis = [x for x in map(int, input().split())]
	lis.sort()
	lis = lis[::-1]
	lis = [str(x) for x in lis]
	print(' '.join(lis))


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		N = int(input())
		A = [int(x) for x in input().split()]
		A.sort(reverse=True)
		print(*A)
main()


def helper(array, n):
	final = ''
	result = sorted(array, reverse=True)
	final += ' '.join(map(lambda x: str(x), result))
	final += '\n'
	return final
t = int(input())
result = ''
for i in range(t):
	n = int(input())
	array = [int(s) for s in input().split(' ')]
	result += helper(array, n)
print(result)


t = int(input())
for i in range(t):
	n = int(input())
	ls = list(map(int, input().split()))
	ls.sort(reverse=True)
	s = ''
	for j in range(n):
		if j < n - 1:
			s = s + str(ls[j]) + ' '
		else:
			s = s + str(ls[j])
	print(s)


import sys
import os
from io import IOBase, BytesIO
import math
mod = 10 ** 9 + 7
pie = 3.1415926536

def modinv(n, p):
	return pow(n, p - 2, p)

def ncr(n, r, p):
	t = fact[n] * (ifact[r] * ifact[n - r] % p) % p
	return t

def ain():
	return list(map(int, sin().split()))

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

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

def read2DIntArray(row, col):
	arr = []
	for i in range(0, row):
		temp = list(map(int, sin().split()))
		arr.append(temp)
	return arr

def read2DCharArray(row, col):
	arr = []
	for i in range(0, row):
		temp = str(sin())
		arr.append(temp)
	return arr

def smallestNumber(n):
	lst = list(str(n))
	lst.sort()
	tmp = ''
	for (i, n) in enumerate(lst):
		if n != '0':
			tmp = lst.pop(i)
			break
	return str(tmp) + ''.join(lst)

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 1
	prime[0] = False
	prime[1] = False
	lst = []
	for p in range(n + 1):
		if prime[p]:
			lst.append(p)
	return lst

def nCr(n, r):
	a = 1
	b = 1
	c = 1
	for i in range(1, n + 1):
		c *= i
	for i in range(1, r + 1):
		b *= i
	for i in range(1, n - r + 1):
		a *= i
	return c // (a * b)

def sieveOfEratosthenes1(N, s):
	prime = [False] * (N + 1)
	for i in range(2, N + 1, 2):
		s[i] = 2
	for i in range(3, N + 1, 2):
		if prime[i] == False:
			s[i] = i
			for j in range(i, int(N / i) + 1, 2):
				if prime[i * j] == False:
					prime[i * j] = True
					s[i * j] = i

def generatePrimeFactors(N):
	s = [0] * (N + 1)
	sieveOfEratosthenes1(N, s)
	curr = s[N]
	cnt = 1
	factors = []
	power = []
	while N > 1:
		N //= s[N]
		if curr == s[N]:
			cnt += 1
			continue
		factors.append(curr)
		power.append(cnt)
		curr = s[N]
		cnt = 1
	return (factors, power)

def main():
	t = int(sin())
	lst = []
	for _ in range(t):
		n = int(sin())
		arr = ain()
		tmp = sorted(arr, reverse=True)
		lst.append(tmp)
	for i in range(t):
		print(*lst[i])
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

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

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			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))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


from sys import stdin, gettrace
if not gettrace():

	def input():
		return next(stdin)[:-1]

def main():

	def solve():
		n = int(input())
		aa = [int(a) for a in input().split()]
		aa.sort(reverse=True)
		print(' '.join(map(str, aa)))
	q = int(input())
	for _ in range(q):
		solve()
main()


t = int(input())
for i in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	A.sort()
	print(*A[::-1])


def solve():
	n = int(input())
	arr = list(map(int, input().split()))
	print(*sorted(arr, key=lambda x: x)[::-1])

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


import os
import heapq
import sys, threading
import math as mt
import operator
from copy import copy
from collections import defaultdict, deque
from io import BytesIO, IOBase

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

def pw(a, b):
	result = 1
	while b > 0:
		if b % 2 == 1:
			result *= a
		a *= a
		b //= 2
	return result

def inpt():
	return [int(k) for k in input().split()]

def main():
	for _ in range(int(input())):
		n = int(input())
		ar = inpt()
		ar.sort(reverse=True)
		print(*ar)
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')
main()


v = int(input())
for k in range(v):
	n = int(input())
	entrada = list(map(int, input().split(' ')))
	ent = sorted(entrada, reverse=True)
	result = ''
	for i in range(n):
		result += str(ent[i]) + ' '
	print(result[:len(result) - 1])


from bisect import bisect_left as lower_bound, bisect_right as upper_bound
from sys import stdin, stdout
from collections import defaultdict

def solve(arr, n):
	pass

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		arr = list(map(int, input().strip().split()))
		arr.sort(reverse=True)
		print(' '.join(list(map(str, arr))))
main()


n = int(input())
for _ in range(n):
	a = int(input())
	res = []
	res = list(map(int, input().split()))
	res.sort(reverse=True)
	print(' '.join([str(c) for c in res]))


def bogosort(array):
	array.sort(reverse=True)
	return array
t = int(input())
array = []
for z in range(t * 2):
	subarray = list(map(int, input().split()))
	array.append(subarray)
for z in range(0, t * 2, 2):
	array_ = array[z + 1]
	array_f = bogosort(array_)
	print(' '.join(map(str, array_f)))


q = int(input())
for _ in range(q):
	t = input()
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	print(*l)


T = int(input())
for _ in range(0, T):
	n = int(input())
	s = [int(x) for x in input().split()]
	s.sort()
	s = s[::-1]
	print(*s)


t = int(input())
for i in range(t):
	n = int(input())
	a = map(int, input().rsplit())
	print(*sorted(a, key=lambda x: -x))


t = int(input())
for q in range(0, t):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	counte = 0
	counto = 0
	for i in range(0, n):
		if a[i] % 2 == 0:
			counte += 1
		else:
			counto += 1
	c = sorted(a, reverse=True)
	print(*c)


for _ in range(int(input())):
	x = int(input())
	li = list(map(int, input().split()))
	li.sort()
	print(*li[::-1])


def bogosort(n, arr):
	arr.sort(reverse=True)
	return ' '.join(map(str, arr))
T = int(input())
for t in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	print(bogosort(n, arr))


T = int(input())
for case in range(T):
	elems = int(input())
	arr = [int(x) for x in input().split(' ')]
	arr = sorted(arr, reverse=True)
	if len(arr) == 1:
		print(arr[0])
	else:
		string = ' '.join([str(x) for x in arr])
		print(string)


k = int(input())
for i in range(k):
	j = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	s = ''
	for i in a:
		s += str(i) + ' '
	print(s[:-1])


def answer(n, a):
	a.sort(reverse=True)
	return ' '.join(map(str, a))

def main():
	t = int(input())
	n = [0] * t
	a = [0] * t
	for j in range(t):
		n[j] = int(input())
		a[j] = [int(i) for i in input().split()]
	for j in range(t):
		print(answer(n[j], a[j]))
main()


for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	A.sort(reverse=True)
	d = []
	for (i, e) in enumerate(A):
		d.append(i - e)
	if len(set(d)) == n:
		print(*A)
	else:
		nums = []
		d = []
		for i in range(n):
			for ele in A:
				if i - ele not in d:
					d.append(i - ele)
					nums.append(ele)
					break
			A.remove(ele)
		print(*nums)


t = int(input())
for i in range(t):
	input()
	lst = list(map(int, input().split()))
	sol = sorted(lst, reverse=True)
	print(' '.join((str(x) for x in sol)))


import sys
input = sys.stdin.readline
for ti in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().strip().split()]
	a.sort(reverse=True)
	print(*a)


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


def main():
	t = int(input())
	for __ in range(t):
		input()
		a = list(map(int, input().split()))
		a.sort(reverse=True)
		print(*a)
main()


for _ in '0' * int(input()):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	print(*a[::-1])


test_cases = int(input().strip())

def testCase():
	n = input()
	A = [int(x) for x in input().strip().split()]
	A_sorted = sorted(A, reverse=True)
	print(' '.join([str(x) for x in A_sorted]))
for t in range(test_cases):
	testCase()


t = int(input())
z = 1
while z <= t:
	n = int(input())
	arr = input().split()
	arr = list(map(int, arr))
	arr.sort(reverse=True)
	print(*arr)
	z = z + 1


def examA():
	T = I()
	ans = []
	for _ in range(T):
		(N, M) = LI()
		if N % M != 0:
			ans.append('NO')
		else:
			ans.append('YES')
	for v in ans:
		print(v)
	return

def examB():
	T = I()
	ans = []
	for _ in range(T):
		N = I()
		A = LI()
		A.sort()
		ans.append(A[::-1])
	for v in ans:
		print(' '.join(map(str, v)))
	return

def examC():
	ans = 0
	print(ans)
	return

def examD():
	ans = 0
	print(ans)
	return

def examE():
	ans = 0
	print(ans)
	return

def examF():
	ans = 0
	print(ans)
	return
import sys, copy, bisect, itertools, heapq, math, random
from heapq import heappop, heappush, heapify
from collections import Counter, defaultdict, deque

def I():
	return int(sys.stdin.readline())

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

def LSI():
	return list(map(str, sys.stdin.readline().split()))

def LS():
	return sys.stdin.readline().split()

def SI():
	return sys.stdin.readline().strip()
global mod, mod2, inf, alphabet, _ep
mod = 10 ** 9 + 7
mod2 = 998244353
inf = 10 ** 18
_ep = 10 ** (-12)
alphabet = [chr(ord('a') + i) for i in range(26)]
examB()


x = int(input())
for i in range(x):
	y = int(input())
	l = list(map(int, input().split()))
	l = sorted(l, reverse=True)
	print(' '.join(map(str, l)))


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	print(*a)


t = int(input())
for _ in range(t):
	n = int(input())
	b = []
	for a in input().split():
		b.append(int(a))
	b.sort()
	b.reverse()
	s = str(b[0])
	for i in range(1, n):
		s += ' ' + str(b[i])
	print(s)


from random import shuffle

def printarr(arr):
	print(' '.join(map(str, arr)))
for _ in range(int(input())):
	input()
	arr = list(map(int, input().split()))
	arr.sort()
	arr.reverse()
	printarr(arr)


t = int(input())
pri = ''
for i in range(t):
	n = int(input())
	lista = list(map(int, input().split()))
	lista.sort()
	lista.reverse()
	for i in range(n):
		pri += str(lista[i]) + ' '
	print(pri[:len(pri) - 1])
	pri = ''


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(s) for s in input().split()]
	a.sort(reverse=True)
	print(*a)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	print(*reversed(sorted(a)))


for _ in range(int(input())):
	input()
	arrs = list(map(int, input().split()))
	arrs = map(str, sorted(arrs, reverse=True))
	print(' '.join(arrs))


import sys
input = lambda : sys.stdin.readline().rstrip()
for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	print(*sorted(a)[::-1])


import sys
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
ni = lambda : int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda : list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda : float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda : list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda : stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda : stdin.readline().split()
t = ni()
for i in range(t):
	N = ni()
	a = na()
	a.sort()
	a.reverse()
	for j in range(N):
		if j >= 1:
			print(' ', end='')
		print(a[j], end='')
	print()


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


def bogosort(n, a):
	return list(map(str, list(reversed(sorted(a)))))
ans = []
t = int(input())
for x in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ans.append(bogosort(n, a))
for y in ans:
	print(' '.join(y))


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


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(j) for j in input().split(' ')]
	a.sort(reverse=True)
	a = [str(i) for i in a]
	print(' '.join(a))


for i in range(int(input())):
	x = int(input())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	print(*l)


testes = int(input())
for t in range(testes):
	tamanho = int(input())
	vet = list(map(int, input().split(' ')))
	vet.sort()
	vet.reverse()
	for k in range(len(vet)):
		print(vet[k], end='')
		if k != len(vet) - 1:
			print(' ', end='')
		else:
			print()


import sys
import math

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

def idata():
	return [int(x) for x in ii().split()]

def binary_search(array, x):
	(left, right) = (-1, len(array))
	while left + 1 != right:
		middle = (left + right) // 2
		if array[middle] >= x:
			right = middle
		elif array[middle] < x:
			left = middle
	return right

def solve_of_problem():
	n = ii()
	data = sorted(idata())
	print(*data[::-1])
	return
for ______ in range(int(ii())):
	solve_of_problem()


import sys
input = sys.stdin.readline
t = int(input())
for i in range(t):
	n = int(input())
	robo = [int(i) for i in input().split()]
	robo.sort(reverse=True)
	print(*robo)


for i in range(int(input())):
	n = int(input())
	o = []
	o = input().split()
	l = [int(o[x]) for x in range(n)]
	l.sort(reverse=True)
	print(*l, sep=' ')


for _ in range(int(input())):
	n = int(input())
	arr = [int(x) for x in input().split()]
	sort = sorted(arr)
	rev = sort[::-1]
	print(*rev)


def I():
	return list(map(int, input().split()))
for __ in range(int(input())):
	n = int(input())
	x = I()
	x.sort(reverse=True)
	print(*x)


result = []
test_case = int(input())
while test_case > 0:
	number_elements = int(input())
	arr = [int(x) for x in input().split(' ')[:number_elements]]
	result.append(sorted(arr, reverse=True))
	test_case -= 1
for line in result:
	print(*line, sep=' ')


data = [[int(i) for i in input().split()] for j in range(int(input()) * 2)]
for i in range(len(data)):
	if i % 2 != 0:
		print(*sorted(data[i], reverse=True))


t = int(input())
while t:
	t -= 1
	n = int(input())
	print(*sorted([int(i) for i in input().split()], reverse=True))


for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().strip().split()))
	A = sorted(A)[::-1]
	print(*A)


for _ in range(0, int(input())):
	input()
	v = sorted(map(int, input().split()), reverse=True)
	print(*v, sep=' ')


import sys
input = sys.stdin.readline

def main():
	for _ in range(int(input())):
		n = int(input())
		a = list(map(int, input().split()))
		a.sort(reverse=True)
		print(*a)
main()


import sys
t = int(sys.stdin.readline())
for i in range(t):
	n = int(sys.stdin.readline())
	array = list(map(int, sys.stdin.readline().split()))
	array.sort()
	array.reverse()
	print(*array)


t = int(input())
while t > 0:
	length = int(input())
	li = list(map(int, input().strip().split()))[:length]
	li.sort(reverse=True)
	print(*li)
	t = t - 1


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	a.sort(reverse=True)
	print(*a)


t = int(input())
AnsList = []
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	AnsList.append(l)
for x in AnsList:
	print(' '.join(map(str, x)))


def answer(arr):
	decreasingArr = sorted(arr, reverse=True)
	return ' '.join([str(i) for i in decreasingArr])
testCount = int(input())
for _ in range(testCount):
	n = input()
	print(answer(list(map(int, input().split()))))


cases = int(input())
for _ in range(cases):
	n = int(input())
	c = sorted(list(map(int, input().split())))[::-1]
	print(*c)


t = int(input())
for i in range(t):
	n = int(input())
	l = sorted(list(map(int, input().split())), reverse=True)
	print(' '.join(map(str, l)))


t = int(input().strip())
from math import gcd
for _ in range(t):
	n = int(input().strip())
	nums = [int(i) for i in input().strip().split()]
	nums.sort(reverse=True)
	print(' '.join((str(i) for i in nums)))


import sys
input = sys.stdin.readline
t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	print(*a)


cases = int(input())
while cases:
	cases -= 1
	num = int(input())
	arr = sorted(map(int, input().split()), reverse=True)
	print(*arr)


n = int(input())
for i in range(n):
	l = int(input())
	s = list(map(int, input().split()))
	s.sort(reverse=True)
	print(*s, sep=' ')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = sorted(a, reverse=True)
	print(*b)


for _ in range(int(input())):
	n = int(input())
	lst = [int(i) for i in input().split()]
	print(*sorted(lst)[::-1])


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	a = sorted(a, reverse=True)
	print(*a)


t = int(input())
for _ in range(t):
	input()
	print(*sorted(list(map(int, input().split())), reverse=True), sep=' ')


mod = 10 ** 9 + 7
import math
from bisect import bisect_left
from collections import Counter
from itertools import combinations

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

def fain():
	return map(float, input().split())

def mc2(s):
	return s * (s - 1) // 2 + s
for _ in range(int(input())):
	n = input()
	l = list(ain())
	l.sort()
	l = list(reversed(l))
	print(*l)


from bisect import *
from math import *
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort(reverse=True)
	arr = [str(j) for j in arr]
	ans = ' '.join(arr)
	print(ans)


def vivod(max):
	if max < 0:
		print(0)
	else:
		print(max)
for i in range(int(input())):
	n = int(input())
	mass = list(map(int, input().split()))
	mass.sort()
	s = ''
	for i in range(0, len(mass)):
		s += str(mass[len(mass) - i - 1])
		s += ' '
	print(s[0:len(s) - 1])


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort(reverse=True)
	s = ' '.join([str(x) for x in a])
	print(s)


for _ in range(int(input())):
	input()
	print(' '.join(map(str, sorted(list(map(int, input().split())))[::-1])))


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().strip().split()))
	a = sorted(a, reverse=True)
	print(*a)


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(s) for s in input().split()]
	a.sort(reverse=True)
	print(' '.join((str(x) for x in a)))


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	a = [int(i) for i in sys.stdin.readline().split()]
	a.sort()
	a = a[::-1]
	ans = ' '.join([str(i) for i in a])
	print(ans)


from sys import stdout, stdin
input = lambda : stdin.readline()
for i in range(int(input())):
	n = map(int, input().split())
	print(' '.join(map(str, sorted(list(map(int, input().split())), reverse=True))))


from collections import Counter
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce

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

def iinput():
	return int(input())

def tinput():
	return input().split()

def rinput():
	return map(int, tinput())

def rlinput():
	return list(rinput())
mod = int(1000000000.0) + 7

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

def solve(s, n, l, r, prefix, k):
	ans = 0
	for i in range(l, r + 1):
		for j in range(i, r + 1):
			ones = prefix[j] - prefix[i - 1]
			zeros = j - i - ones + 1
			if prefix[j] - prefix[i - 1] <= k and zeros <= k:
				ans += 1
	return ans
for _ in range(iinput()):
	n = iinput()
	a = rlinput()
	a.sort(reverse=True)
	print(' '.join(map(str, a)))


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(s) for s in input().split()]
	print(*sorted(a)[::-1])


from fractions import Fraction
import sys
import bisect
import heapq
from math import *
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
mod = 1000000007

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

def out(var):
	sys.stdout.write(str(var))

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

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def graph(vertex):
	return [[] for i in range(0, vertex + 1)]

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

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

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

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def solve():
	n = int(inp())
	a = lis()
	a = sorted(a)[::-1]
	print(*a)
testcase(int(inp()))


def addAns(arr, n):
	final = ''
	result = sorted(arr, reverse=True)
	final += ' '.join(map(lambda x: str(x), result))
	final += '\n'
	return final
totalNum = int(input())
res = ''
for i in range(totalNum):
	arraySize = int(input())
	tempArray = [int(s) for s in input().split(' ')]
	res += addAns(tempArray, arraySize)
print(res)


import sys
input = lambda : sys.stdin.readline().rstrip()
t = int(input())
for _ in range(t):
	n = int(input())
	A = [int(i) for i in input().split()]
	A.sort(reverse=True)
	print(*A)


def main(a):
	a = sorted(a, reverse=True)
	print(*a)
t = int(input())
A = [[] for _ in range(t)]
for i in range(t):
	_ = int(input())
	A[i] = list(map(int, input().split()))
for a in A:
	main(a)


R = lambda : map(int, input().split())
for _ in range(int(input())):
	n = int(input())
	arr = sorted(R(), reverse=True)
	print(*arr)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		print(*a)
	else:
		a.sort(reverse=True)
		print(*a)


import sys
input = sys.stdin.readline

def fastio():
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()
INF = 10 ** 20
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br
(t,) = I()
while t:
	t -= 1
	(n,) = I()
	a = I()
	a.sort(reverse=True)
	print(*a)


t = int(input())
p = []
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		p.append(' '.join(map(str, a)))
	else:
		a.sort()
		a.reverse()
		p.append(' '.join(map(str, a)))
for i in range(len(p)):
	print(p[i])


import io
import os
from collections import defaultdict, deque, Counter

def solve(N, A):
	A.sort(reverse=True)
	return ' '.join(map(str, A))
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
T = int(input())
for t in range(T):
	(N,) = list(map(int, input().split()))
	A = list(map(int, input().split()))
	ans = solve(N, A)
	print(ans)


def is_ok(nums):
	difs = []
	for i in range(len(nums)):
		temp = i - nums[i]
		if temp in difs:
			return False
		else:
			difs.append(temp)
	return True
for i in range(int(input())):
	n = int(input())
	nums = [int(x) for x in input().split()]
	nums.sort(reverse=True)
	index = 1
	counter = 0
	while True:
		if is_ok(nums):
			print(*nums)
			break
		else:
			nums = nums[index:] + nums[:index]
			counter += 1
		if counter == n - index:
			index += 1
			counter = 0


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


for i in range(int(input())):
	t = int(input())
	l = [int(x) for x in input().split()]
	l.sort(reverse=True)
	k = [str(x) for x in l]
	print(' '.join(k))


from collections import Counter
from collections import defaultdict
import math
t = int(input())
for _ in range(0, t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	print(*a)


from sys import stdin

def readint():
	return int(stdin.readline())

def readarray(typ):
	return list(map(typ, stdin.readline().split()))

def readmatrix(n, m):
	M = []
	for _ in range(n):
		row = readarray(int)
		assert len(row) == m
		M.append(row)
	return M

def solve():
	n = readint()
	array_ = readarray(int)
	print(*list(reversed(sorted(array_))))
T = 1
T = readint()
for _ in range(T):
	solve()


import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub
sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2 ** 62 - 1

def read_int():
	return int(input())

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

def read_float():
	return float(input())

def read_float_n():
	return list(map(float, input().split()))

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

def read_str_n():
	return list(map(str, input().split()))

def error_print(*args):
	print(*args, file=sys.stderr)

def mt(f):
	import time

	def wrap(*args, **kwargs):
		s = time.time()
		ret = f(*args, **kwargs)
		e = time.time()
		error_print(e - s, 'sec')
		return ret
	return wrap

@mt
def slv(N, A):
	A.sort(reverse=True)
	return A

def main():
	T = read_int()
	for _ in range(T):
		N = read_int()
		A = read_int_n()
		print(*slv(N, A))
main()


for i in range(int(input())):
	a = int(input())
	l = sorted(list(map(int, input().split())))
	k = l[::-1]
	print(*k)


def sort(n):
	for i in range(n):
		k = int(input())
		l = list(map(int, input().split()))
		l = sorted(l, reverse=True)
		print(*l)
g = int(input())
sort(g)


from sys import stdin
for _ in range(int(stdin.readline())):
	stdin.readline()
	print(*sorted(map(int, stdin.readline().split()), reverse=True))


import sys
input = lambda : sys.stdin.readline().rstrip()
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	print(*a)


def sd(a):
	return a[::-1]
t = int(input())
for i in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	A.sort()
	A = sd(A)
	print(*A)


def bogosort(l):
	l.sort(reverse=True)
	return l
t = int(input())
for i in range(1, t + 1):
	n = int(input())
	l = [int(s) for s in input().split(' ')]
	ans = map(str, bogosort(l))
	print(' '.join(ans))


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	i = 0
	a.sort(reverse=True)
	print(*a)


for i in [0] * int(input()):
	input()
	print(*sorted(map(int, input().split()))[::-1])


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

def I():
	return int(input())

def S():
	return str(input())

def L():
	return list(R())
from collections import Counter
import math
import sys
from itertools import permutations
import bisect
for _ in range(I()):
	n = I()
	a = L()
	a.sort()
	a.reverse()
	print(*a)


import sys
input = sys.stdin.readline

def solve():
	n = int(input())
	al = list(map(int, input().split()))
	al.sort()
	al.reverse()
	print(' '.join((str(x) for x in al)))

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


t = int(input())
for case in range(t):
	n = int(input())
	arr = sorted(list(map(int, input().split())))
	brr = list(reversed(sorted(arr)))
	crr = [str(i) for i in brr]
	print(' '.join(crr))


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

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

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

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

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)
for _ in range(ii()):
	n = ii()
	a = li()
	a.sort(reverse=True)
	print(*a)


from bisect import bisect_left as bl
from bisect import bisect_right as br
import heapq
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline
M = mod = 998244353

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip('\n').split()]

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

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

def li2():
	return [i for i in input().rstrip('\n')]

def li3():
	return [int(i) for i in input().rstrip('\n')]
for _ in range(val()):
	n = val()
	l = li()
	l = sorted(l, reverse=1)
	print(*l)


for _ in range(int(input())):
	n = int(input())
	m = list(map(int, input().strip().split()))
	m.sort()
	m = m[::-1]
	print(*m)


import sys
sys.setrecursionlimit(10 ** 6)

def main(t):
	n = int(input())
	print(*sorted(map(int, input().split()), reverse=True))
	if t > 1:
		main(t - 1)
main(int(input()))


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	a = sorted(a)
	b = a[::-1]
	for j in range(n - 1):
		print(b[j], end=' ')
	print(b[n - 1])


a = int(input())
for i in range(a):
	s = int(input())
	z = list(map(int, input().split()))
	x = sorted(z, reverse=True)
	print(' '.join(map(str, x)))


numberTest = int(input())
testDone = 0

def array(numberTest):
	lengthArray = int(input())
	test = list(map(int, input().split()))
	x = sorted(test, reverse=True)
	listToStr = ' '.join([str(elem) for elem in x])
	print(listToStr)
while testDone < numberTest:
	array(numberTest)
	testDone += 1


N = int(input())
for i in range(N):
	input()
	L = list(map(int, input().split()))
	L.sort(reverse=True)
	print(*L)


import math

class Read:

	@staticmethod
	def string():
		return input()

	@staticmethod
	def int():
		return int(input())

	@staticmethod
	def list(sep=' '):
		return input().split(sep)

	@staticmethod
	def list_int(sep=' '):
		return list(map(int, input().split(sep)))

def solve():
	n = Read.int()
	a = Read.list_int()
	a.sort()
	a.reverse()
	print(' '.join((str(x) for x in a)))
query_count = Read.int()
while query_count:
	query_count -= 1
	solve()


local = False
if local:
	file = open('A.txt', 'r')

def IN():
	if local:
		return file.readline()
	else:
		return input()

def solve(arr):
	return sorted(arr, reverse=True)
t = int(IN())
for i in range(t):
	n = int(IN())
	arr = [int(_) for _ in IN().split()]
	arr = solve(arr)
	print(' '.join([str(x) for x in arr]))


q = int(input())
for irweewr in range(q):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	l.reverse()
	print(*l)


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l = sorted(l)
	l = l[::-1]
	print(*l)


t = int(input())
while t:
	t -= 1
	n = int(input())
	m = sorted(list(map(int, input().split())), reverse=True)
	print(*m)


def bogosort():
	t = int(input())
	aux = []
	resultado = []
	for i in range(t):
		n = int(input())
		l = list(map(int, input().split()))
		l.sort()
		l.reverse()
		aux.append(l)
	for i in aux:
		print(*i)
bogosort()


t = int(input())
while t:
	t -= 1
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	l.reverse()
	print(*l)


def pr(a):
	s = set()
	for i in range(len(a)):
		if i - a[i] in s:
			return i
		s.add(i - a[i])
	return -1
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a, reverse=1)
	print(*a)


for i in range(int(input())):
	n = int(input())
	print(*list(reversed(sorted(list(map(int, input().split()))))))


t = int(input())
for t0 in range(t):
	n = int(input())
	str1 = input()
	list1 = str1.split()
	list2 = []
	for i in list1:
		i0 = int(i)
		list2.append(i0)
	list2.sort()
	list2 = list2[::-1]
	list3 = []
	for j in list2:
		j0 = str(j)
		list3.append(j0)
	str2 = ' '.join(list3)
	print(str2)


import sys
readline = sys.stdin.buffer.readline
T = int(readline())
Ans = [None] * T
for qu in range(T):
	N = int(readline())
	A = list(map(int, readline().split()))
	A.sort(reverse=True)
	Ans[qu] = ' '.join(map(str, A))
print('\n'.join(Ans))


t = int(input())
for _ in range(t):
	n = int(input())
	x = list(map(int, input().split()))
	x.sort(reverse=True)
	print(*x)


for _ in range(int(input())):
	input()
	l = [int(i) for i in input().split()]
	l.sort(reverse=True)
	print(*l)


t = int(input())
for x in range(t):
	n = int(input())
	l1 = [int(x) for x in input().split()]
	l1.sort(reverse=True)
	print(*l1)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	l1 = l[:n // 2]
	l2 = l[n // 2:]
	l1 = sorted(l1, reverse=True)
	l2 = sorted(l2, reverse=True)
	print(*l2 + l1)


for _ in range(int(input())):
	n = int(input())
	print(*sorted([int(x) for x in input().split()])[::-1])


for case in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort(reverse=True)
	print(*a)


t = int(input())
for i in range(t):
	size = int(input())
	elements = input().split(' ')
	ordered = sorted(elements, key=lambda x: int(x), reverse=True)
	print(' '.join(ordered))


bazooka = input
exec(int(bazooka()) * 'bazooka();print(*sorted(bazooka().split(),key=int)[::-1]);')


tininttni = int(input())
for hk in range(tininttni):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	print(*a)


def solver(n, arr):
	return ' '.join(list(map(lambda x: str(x), sorted(list(map(lambda x: int(x), arr)), reverse=True))))
N = int(input())
for _ in range(N):
	n = input()
	arr = str(input()).split(' ')
	print(solver(n, arr))


t = int(input())
res = []
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	s = ''
	for j in a:
		s += str(j) + ' '
	res.append(s[:len(s) - 1])
for i in res:
	print(i)


def f():
	n = int(input())
	A = [int(s) for s in input().split()]
	A.sort(reverse=True)
	print(' '.join((str(num) for num in A)))
t = int(input())
for i in range(t):
	f()


n = int(input())
for _ in range(n):
	len = int(input())
	array = list([int(x) for x in input().split()])
	array = list(reversed(sorted(array)))
	print(' '.join([str(x) for x in array]))


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


t = int(input())
for loop in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	a.reverse()
	print(*a)


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(i) for i in input().split(' ')]
	a.sort()
	print(*reversed(a))


t = int(input())
ans = []
for _ in range(t):
	tn = int(input())
	ta = sorted(list(map(int, input().split())), reverse=True)
	ans.append(ta)
for a in ans:
	print(*a)


from math import ceil, log, floor, sqrt
import math
k = 1

def mod_expo(n, p, m):
	result = 1
	while p != 0:
		if p % 2 == 1:
			result = result * n % m
		p //= 2
		n = n * n % m
	return result

def is_prime(n):
	m = 2
	while m * m <= n:
		if n % m == 0:
			return False
		m += 1
	return True

def find_sum(n, a):
	a.insert(0, 0)
	for i in range(1, n + 1):
		prev = a[i] & a[i - 1]
		cur = a[i] | a[i - 1]
		a[i - 1] = prev
		a[i] = cur
	return sum((m * m for m in a))

def prin_abc(x, y, z):
	l = [x, y, z]
	l.sort()
	if l[1] < l[2]:
		print('NO')
		return
	a = b = l[0]
	c = l[2]
	print('YES')
	print(a, b, c)

def get_scores(n, vals):
	l = 0
	r = n - 1
	turn = 0
	sereja = 0
	dima = 0
	while l <= r:
		if vals[l] > vals[r]:
			cur = vals[l]
			l += 1
		else:
			cur = vals[r]
			r -= 1
		if turn == 0:
			sereja += cur
		else:
			dima += cur
		turn = not turn
	print(sereja, dima)

def count_lamps(n, m):
	return (n * m + 1) // 2

def find_holidays(n):
	cnt = 2 * (n // 7)
	rem = n % 7
	mx = mn = cnt
	if rem == 1:
		mx += 1
	elif rem > 1:
		mx += 2
	if rem == 6:
		mn += 1
	print(mn, mx)

def count_eggs(n, s, t):
	return max(1, max(n - s + 1, n - t + 1))

def get_a(n, a):
	a.sort(reverse=True)
	print(*a, sep=' ')
t = 1
t = int(input())
while t:
	t = t - 1
	(k, g) = (0, 0)
	points = []
	n = int(input())
	a = list(map(int, input().strip().split()))[:n]
	get_a(n, a)


for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split(' ')))
	if n == 1:
		print(A[0])
	else:
		A.sort(reverse=True)
		print(*A)


def check(aa):
	flag = True
	for i in range(len(aa) - 1):
		if flag:
			for j in range(i + 1, len(aa)):
				if j - aa[j] == i - aa[i]:
					flag = False
					break
	return flag

def get_split_index(A):
	i = len(A) - 1
	while i > 0:
		if A[i] < A[i - 1]:
			i -= 1
		else:
			break
	return i - 1

def get_change_index(A, i):
	j = len(A) - 1
	while j >= i:
		if A[j] > A[i]:
			break
		else:
			j -= 1
	return j

def swap(A, i, j):
	(A[i], A[j]) = (A[j], A[i])

def reverse(A, start):
	left = start
	right = len(A) - 1
	while left < right:
		swap(A, left, right)
		left += 1
		right -= 1

def next_permutation(A):
	split_index = get_split_index(A)
	if split_index == -1:
		reverse(A, 0)
	else:
		change_index = get_change_index(A, split_index)
		swap(A, split_index, change_index)
		reverse(A, split_index + 1)
for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort(reverse=True)
	if not check(a):
		while True:
			if check(a):
				break
			next_permutation(a)
	print(*a)


cases = int(input())
for _ in range(cases):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	print(*l)


T = int(input())
for i in range(0, T * 2, 2):
	N = input()
	arr = list(map(int, input().split()))
	arr.sort(reverse=True)
	print(' '.join(map(str, arr)))


t = int(input())
for i in range(t):
	n = int(input())
	lst = list(map(int, input().strip().split()))[:n]
	temp = 0
	lst.sort(reverse=True)
	for j in range(n - 1):
		if j + 1 - lst[j + 1] == j - lst[j]:
			temp = lst[j + 1]
			lst[j + 1] = lst[j]
			lst[j] = temp
	print(*lst)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().strip().split()))
	x = sorted(a)
	x = x[::-1]
	print(*x)


import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def get_str():
	return input().decode().strip()

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

def oint():
	return int(input())
t = oint()
for _ in range(t):
	n = oint()
	a = list(rint())
	a.sort(reverse=True)
	print(*a)


printn = lambda x: print(x, end='')
inn = lambda : int(input())
inl = lambda : list(map(int, input().split()))
inm = lambda : map(int, input().split())
ins = lambda : input().strip()
DBG = True
BIG = 10 ** 18
R = 10 ** 9 + 7

def ddprint(x):
	if DBG:
		print(x)
t = inn()
for tt in range(t):
	n = inn()
	a = inl()
	a.sort(reverse=True)
	pad = ''
	for x in a:
		printn(pad + str(x))
		pad = ' '
	print('')


import sys
input = sys.stdin.readline

def getInt():
	return int(input())

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

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

def getStr():
	return input().strip()
t = getInt()
for _ in range(t):
	n = getInt()
	a = getList()
	a.sort(reverse=True)
	print(*a)


import sys
n = int(sys.stdin.readline())
for _ in range(n):
	m = int(sys.stdin.readline())
	nums = list(map(int, sys.stdin.readline().split()))
	nums.sort(reverse=True)
	print(' '.join([str(x) for x in nums]))


queries = int(input())
for _ in range(queries):
	_ = input()
	array = [int(value) for value in input().split()]
	array.sort(reverse=True)
	result = [str(item) for item in array]
	print(' '.join(result))


from sys import stdin, stdout
nmbr = lambda : int(input())
lst = lambda : list(map(int, input().split()))
for _ in range(nmbr()):
	n = nmbr()
	a = lst()
	print(*sorted(a, reverse=1))


t = int(input())
a = 0
x = []
L2 = [[]] * t
for i in range(0, t):
	a = int(input())
	L2[i] = [0] * a
	L2[i] = list(map(int, input().split()))
	L2[i].sort(reverse=True)
for row in L2:
	print(*row)


t = int(input())
for t0 in range(t):
	n = int(input())
	A = [int(i) for i in input().split()]
	A.sort(reverse=True)
	B = [str(k) for k in A]
	print(' '.join(B))


from sys import stdin, stdout
from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import *
input = stdin.readline
prin = stdout.write
from random import sample
from collections import Counter, deque
from math import sqrt, ceil, log2, gcd
mod = 10 ** 9 + 7

def f(arr, i, j, d, dist):
	if i == j:
		return
	nn = max(arr[i:j])
	for tl in range(i, j):
		if arr[tl] == nn:
			dist[tl] = d
			f(arr, i, tl, d + 1, dist)
			f(arr, tl + 1, j, d + 1, dist)

def ps(n):
	cp = 0
	lk = 0
	arr = {}
	while n % 2 == 0:
		n = n // 2
		lk += 1
	arr[2] = lk
	for ps in range(3, ceil(sqrt(n)) + 1, 2):
		lk = 0
		while n % ps == 0:
			n = n // ps
			arr.append(n)
			arr.append(ps ** (lk + 1))
			lk += 1
		arr[ps] = lk
	if n != 1:
		lk += 1
		arr[n] = lk
	return arr

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

def factorials(n, r):
	slr = n
	dpr = r
	qlr = 1
	qs = 1
	mod = 10 ** 9 + 7
	for ip in range(n - r + 1, n + 1):
		qlr = qlr * ip % mod
	for ij in range(1, r + 1):
		qs = qs * ij % mod
	ans = qlr * modInverse(qs) % mod
	return ans

def modInverse(b):
	qr = 10 ** 9 + 7
	return pow(b, qr - 2, qr)
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func

def power(arr):
	listrep = arr
	subsets = []
	for i in range(2 ** len(listrep)):
		subset = []
		for k in range(len(listrep)):
			if i & 1 << k:
				subset.append(listrep[k])
		subsets.append(subset)
	return subsets

def dis(xa, ya, xb, yb):
	return sqrt((xa - xb) ** 2 + (ya - yb) ** 2)

def ii():
	return int(input())

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

def out(array: list) -> str:
	array = [str(x) for x in array]
	return ' '.join(array)

def islist():
	return list(map(str, input().split().rstrip()))

def outfast(arr: list) -> str:
	ss = ''
	for ip in arr:
		ss += str(ip) + ' '
	return prin(ss)

def pda(n):
	list = []
	for i in range(1, int(sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				list.append(i)
			else:
				list.append(int(n / i))
				list.append(i)
	return list
t = int(input())
for jj in range(t):
	n = ii()
	arr = ilist()
	pp = 0
	co = -1
	print(out(sorted(arr)[::-1]))


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

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

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def main():
	t = I()
	rr = []
	for _ in range(t):
		n = I()
		a = LI()
		rr.append(JA(sorted(a, reverse=True), ' '))
	return JA(rr, '\n')
print(main())


t = int(input())
for q in range(t):
	n = int(input())
	A = []
	for w in input().split():
		A.append(int(w))
		A.sort(reverse=True)
	print(*A)


cc = int(input())
while cc > 0:
	cc -= 1
	nn = int(input())
	(*aa,) = map(int, input().split())
	aa = sorted(aa, reverse=True)
	print(*aa)


test_cases = int(input())

def handle():
	input()
	values = sorted([int(i) for i in input().split(' ')], reverse=True)
	return ' '.join([str(s) for s in values])
for _ in range(test_cases):
	print(handle())


import random
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	print(*a)


numTests = int(input())
result = ''
for count in range(numTests):
	n = int(input())
	A = [int(i) for i in input().split(' ')]
	A = sorted(A, reverse=True)
	result += ' '.join(map(lambda x: str(x), A))
	result += '\n'
print(result)


import math

def inp_n():
	return int(input())

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

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

def is_odd(n):
	if n & 1:
		return True
	return False
for _ in range(inp_n()):
	n = inp_n()
	l = inp_list()
	l.sort(reverse=True)
	print(*l)


t = int(input())
for i in range(t):
	n = int(input())
	x = sorted(map(int, input().split()))
	print(*reversed(x))


import itertools
tc = int(input())
for tc in range(tc):
	length = int(input())
	arr = [int(x) for x in input().split()]
	print(' '.join([str(x) for x in sorted(arr, reverse=True)]))


def main_function():

	def merge(A: list, B: list):
		C = [0] * (len(A) + len(B))
		i = j = n = 0
		while i < len(A) and j < len(B):
			if A[i] >= B[j]:
				C[n] = A[i]
				i += 1
				n += 1
			else:
				C[n] = B[j]
				j += 1
				n += 1
		if i == len(A):
			C[n:] = B[j:]
		else:
			C[n:] = A[i:]
		return C

	def merge_sort(A: list):
		if len(A) == 1:
			return A
		L = A[:len(A) // 2]
		R = A[len(A) // 2:]
		merge_sort(L)
		merge_sort(R)
		A[:] = merge(L, R)
	t = int(input())
	for i in range(t):
		(n, A) = (int(input()), list(map(int, input().split(' '))))
		merge_sort(A)
		print(*A)
main_function()


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr = sorted(arr)
	arr.reverse()
	print(' '.join(map(str, arr)))


from math import log, ceil
from collections import defaultdict
from math import *
from sys import stdin, stdout
import itertools
import os
import sys
import threading
from collections import deque, Counter, OrderedDict, defaultdict
from heapq import *
from fractions import Fraction
mod = int(pow(10, 9) + 7)

def ii():
	return int(input())

def si():
	return str(input())

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

def li():
	return list(mi())

def fii():
	return int(stdin.readline())

def fsi():
	return str(stdin.readline())

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

def fli():
	return list(fmi())
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y) = mi()
		if x not in d:
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d:
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = defaultdict(list)
	for i in range(n):
		(x, y) = mi()
		d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans

def primeFactors(n):
	s = set()
	while n % 2 == 0:
		s.add(2)
		n = n // 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while n % i == 0:
			s.add(i)
			n = n // i
	if n > 2:
		s.add(n)
	return s

def find_all(a_str, sub):
	start = 0
	while True:
		start = a_str.find(sub, start)
		if start == -1:
			return
		yield start
		start += len(sub)

def SieveOfEratosthenes(n, isPrime):
	isPrime[0] = isPrime[1] = False
	for i in range(2, n):
		isPrime[i] = True
	p = 2
	while p * p <= n:
		if isPrime[p] == True:
			i = p * p
			while i <= n:
				isPrime[i] = False
				i += p
		p += 1
	return isPrime

def dijkstra(edges, f, t):
	g = defaultdict(list)
	for (l, r, c) in edges:
		g[l].append((c, r))
	(q, seen, mins) = ([(0, f, ())], set(), {f: 0})
	while q:
		(cost, v1, path) = heappop(q)
		if v1 not in seen:
			seen.add(v1)
			path = (v1, path)
			if v1 == t:
				return (cost, path)
			for (c, v2) in g.get(v1, ()):
				if v2 in seen:
					continue
				prev = mins.get(v2, None)
				next = cost + c
				if prev is None or next < prev:
					mins[v2] = next
					heappush(q, (next, v2, path))
	return float('inf')

def binsearch(a, l, r, x):
	while l <= r:
		mid = l + (r - 1) // 2
		if a[mid]:
			return mid
		elif a[mid] > x:
			l = mid - 1
		else:
			r = mid + 1
	return -1

def dfs(d, v):
	q = []
	q.insert(0, v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.insert(0, i)
		print(x)
for _ in range(ii()):
	n = ii()
	a = sorted(li())[::-1]
	print(*a)


from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time

def I():
	return int(input())

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

def S():
	return input()

def MS():
	return map(str, input().split())

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

def LI_():
	return [int(i) - 1 for i in input().split()]

def StoI():
	return [ord(i) - 97 for i in input()]

def ItoS(nn):
	return chr(nn + 97)

def input():
	return sys.stdin.readline().rstrip()

def print_matrix(mat):
	for i in range(len(mat)):
		print(*mat[i])

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
YN = {False: 'No', True: 'Yes'}
MOD = 10 ** 9 + 7
inf = float('inf')
IINF = 10 ** 10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
show_flg = False
import random

def solve(T):
	n = I()
	a = LI()
	a = sorted(a, reverse=True)
	print(*a)

def main():
	T = I()
	for i in range(T):
		solve(T)
main()


res = []
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	l.reverse()
	res = ' '.join(list(map(str, l)))
	print(res)


def rgon():
	T = int(input())
	for i in range(T):
		n = int(input())
		A = input().split(' ')
		Alis = [int(x) for x in A]
		Alis.sort(reverse=True)
		A = [str(x) for x in Alis]
		print(' '.join(A))
rgon()


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if len(a) == 1:
		print(a[0])
	else:
		a = sorted(a, reverse=True)
		print(' '.join((str(r) for r in a)))


for _ in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	b = reversed(a)
	print(*b)


from sys import stdin
from random import randint
n = int(stdin.readline())
for _ in range(n):
	stdin.readline()
	arr = map(int, stdin.readline().split())
	res = sorted(arr, reverse=True)
	print(' '.join((str(item) for item in res)))


alpha = int(input())
for j in range(alpha):
	beta = int(input())
	z = list(map(int, input().split()))
	s = ''
	z.sort(reverse=True)
	for i in range(len(z) - 1):
		s += str(z[i])
		s += ' '
	s += str(z[len(z) - 1])
	print(s)


for k in range(int(input())):
	input()
	x = sorted(list(map(int, input().split())))
	x = x[-1::-1]
	print(*x, sep=' ')


from sys import stdin, stdout
import bisect

def st():
	return list(stdin.readline().strip())

def inp():
	return int(stdin.readline())

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

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

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

def soe(limit):
	l = [1] * (limit + 1)
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
			n = n - 1
		else:
			a = a * a
			n = n >> 1
	return r

def solve():
	n = inp()
	l = li()
	l.sort(reverse=True)
	print(*l)
for _ in range(inp()):
	solve()


n = int(input())
for i in range(n):
	n1 = int(input())
	ar = list(map(int, input().split()))
	print(' '.join(map(str, sorted(ar, reverse=True))))


for tini in range(int(input())):
	i = 0
	n = map(int, input().split())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	print(*a)


t = int(input())
for i in range(t):
	n = int(input())
	a = input().split()
	a.sort(key=lambda x: int(x), reverse=True)
	print(' '.join(a))


from sys import stdin
from bisect import bisect_left, bisect_right, insort
from math import sqrt, ceil, floor, factorial, gcd
t = int(stdin.readline())
while t:
	t -= 1
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	a.sort(reverse=True)
	print(*a)


import sys
import math
import bisect

def main():
	for _ in range(int(input())):
		n = int(input())
		A = list(map(int, input().split()))
		A.sort(reverse=True)
		print(' '.join(list((str(a) for a in A))))
main()


T = int(input())
for _ in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort(reverse=True)
	print(*arr)


inp = lambda : list(map(int, input().split()))
t = int(input())
for _ in range(t):
	n = int(input())
	arr = inp()
	print(' '.join([str(i) for i in sorted(arr, reverse=True)]))


import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')
t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr = reversed(sorted(arr))
	sys.stdout.write(' '.join(map(str, arr)) + '\n')


def solution():
	from sys import stdout, stdin
	from collections import defaultdict
	(_input, _print) = (stdin.readline, stdout.write)
	(_range, _int, _list) = (range, int, list)
	for _ in _range(_int(_input())):
		n = _int(_input())
		a = [_int(i) for i in _input().split()]
		print(*sorted(a, reverse=True))
solution()


import sys
t = int(sys.stdin.readline())
for i in range(t):
	n = int(sys.stdin.readline())
	arr = list(map(int, sys.stdin.readline().split()))
	arr = sorted(arr, reverse=True)
	print(' '.join(map(str, arr)))


task_number = int(input())
for _ in range(task_number):
	_ = input()
	array = [int(item) for item in input().split()]
	array.sort(reverse=True)
	print(' '.join((str(x) for x in array)))


R1 = lambda : list(map(int, input().split()))
R2 = lambda : int(input())
t = R2()
for _ in range(t):
	n = R2()
	print(*sorted(R1())[::-1])


from sys import stdin
for testcase in range(int(stdin.readline())):
	stdin.readline()
	print(*reversed(sorted(map(int, stdin.readline().split()))))


T = int(input())
for _ in range(T):
	N = int(input())
	arr = list(map(int, input().split()))
	arr.sort(reverse=True)
	print(' '.join(map(str, arr)))


for x in range(int(input())):
	n = int(input())
	m = list(map(int, input().split()))
	m.sort(reverse=True)
	print(*m)


import math
q = int(input())
for _ in range(q):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	print(*l)


def solve(a, n):
	a.sort(reverse=True)
	return a
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split(' ')))
	y = solve(a, n)
	print(' '.join(map(str, y)))


from __future__ import division, print_function
import math
import os
import sys
from fractions import *
from sys import *
from decimal import *
from io import BytesIO, IOBase
from itertools import *
from collections import *
M = 10 ** 9 + 7
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
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 inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

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

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def fsep():
	return map(float, inp().split())

def inpu():
	return int(inp())

def regularbracket(t):
	p = 0
	for i in t:
		if i == '(':
			p += 1
		else:
			p -= 1
		if p < 0:
			return False
	else:
		if p > 0:
			return False
		else:
			return True

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] <= key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def reverse1(string):
	pp = ''
	for i in string[::-1]:
		pp += i
	if pp == string:
		return True
	return False

def reverse2(list1):
	l = []
	for i in list1[::-1]:
		l.append(i)
	if l == list1:
		return True
	return False

def mex(list1):
	p = max(list1) + 1
	for i in range(len(list1)):
		if list1[i] != i:
			p = i
			break
	return p

def sumofdigits(n):
	n = str(n)
	s1 = 0
	for i in n:
		s1 += int(i)
	return s1

def perfect_square(n):
	s = math.sqrt(n)
	if s == int(s):
		return True
	return False

def roman_number(x):
	if x > 15999:
		return
	value = [5000, 4000, 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]
	symbol = ['F', 'MF', 'M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I']
	roman = ''
	i = 0
	while x > 0:
		div = x // value[i]
		x = x % value[i]
		while div:
			roman += symbol[i]
			div -= 1
		i += 1
	return roman

def soretd(s):
	for i in range(1, len(s)):
		if s[i - 1] > s[i]:
			return False
	return True

def countRhombi(h, w):
	ct = 0
	for i in range(2, h + 1, 2):
		for j in range(2, w + 1, 2):
			ct += (h - i + 1) * (w - j + 1)
	return ct

def countrhombi2(h, w):
	return h * h // 4 * (w * w // 4)

def binpow(a, b):
	if b == 0:
		return 1
	else:
		res = binpow(a, b // 2)
	if b % 2 != 0:
		return res * res * a
	else:
		return res * res

def binpowmodulus(a, b, m):
	a %= m
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % m
		a = a * a % m
		b >>= 1
	return res

def coprime_to_n(n):
	result = n
	i = 2
	while i * i <= n:
		if n % i == 0:
			while n % i == 0:
				n //= i
			result -= result // i
		i += 1
	if n > 1:
		result -= result // n
	return result

def prime(x):
	if x == 1:
		return False
	else:
		for i in range(2, int(math.sqrt(x)) + 1):
			if x % i == 0:
				return False
		else:
			return True

def luckynumwithequalnumberoffourandseven(x, n, a):
	if x >= n and str(x).count('4') == str(x).count('7'):
		a.append(x)
	elif x < 1000000000000.0:
		luckynumwithequalnumberoffourandseven(x * 10 + 4, n, a)
		luckynumwithequalnumberoffourandseven(x * 10 + 7, n, a)
	return a

def luckynum(x, l, r, a):
	if x >= l and x <= r:
		a.append(x)
	if x > r:
		a.append(x)
		return a
	if x < 10000000000.0:
		luckynum(x * 10 + 4, l, r, a)
		luckynum(x * 10 + 7, l, r, a)
	return a

def luckynuber(x, n, a):
	p = set(str(x))
	if len(p) <= 2:
		a.append(x)
	if x < n:
		luckynuber(x + 1, n, a)
	return a

def interact(type, x):
	if type == 'r':
		inp = input()
		return inp.strip()
	else:
		print(x, flush=True)

def findTrailingZeros(n):
	count = 0
	while n >= 5:
		n //= 5
		count += n
	return count

def mergeSort(arr):
	if len(arr) > 1:
		mid = len(arr) // 2
		L = arr[:mid]
		R = arr[mid:]
		mergeSort(L)
		mergeSort(R)
		i = j = k = 0
		while i < len(L) and j < len(R):
			if L[i] < R[j]:
				arr[k] = L[i]
				i += 1
			else:
				arr[k] = R[j]
				j += 1
			k += 1
		while i < len(L):
			arr[k] = L[i]
			i += 1
			k += 1
		while j < len(R):
			arr[k] = R[j]
			j += 1
			k += 1
res = set()

def solven(p, l, a, b, n):
	if p > n or l > 10:
		return
	if p > 0:
		res.add(p)
	solven(p * 10 + a, l + 1, a, b, n)
	solven(p * 10 + b, l + 1, a, b, n)

def subsetsUtil(A, subset, index, d):
	print(*subset)
	s = sum(subset)
	d.append(s)
	for i in range(index, len(A)):
		subset.append(A[i])
		subsetsUtil(A, subset, i + 1, d)
		subset.pop(-1)
	return d

def subsetSums(arr, l, r, d, sum=0):
	if l > r:
		d.append(sum)
		return
	subsetSums(arr, l + 1, r, d, sum + arr[l])
	subsetSums(arr, l + 1, r, d, sum)
	return d

def print_factors(x):
	factors = []
	for i in range(1, x + 1):
		if x % i == 0:
			factors.append(i)
	return factors

def calc(X, d, ans, D):
	if len(X) == 0:
		return
	i = X.index(max(X))
	ans[D[max(X)]] = d
	Y = X[:i]
	Z = X[i + 1:]
	calc(Y, d + 1, ans, D)
	calc(Z, d + 1, ans, D)

def factorization(n, l):
	c = n
	if prime(n) == True:
		l.append(n)
		return l
	for i in range(2, c):
		if n == 1:
			break
		while n % i == 0:
			l.append(i)
			n = n // i
	return l

def good(b):
	l = []
	i = 0
	while len(b) != 0:
		if b[i] < b[len(b) - 1 - i]:
			l.append(b[i])
			b.remove(b[i])
		else:
			l.append(b[len(b) - 1 - i])
			b.remove(b[len(b) - 1 - i])
	if l == sorted(l):
		return True
	return False

def generate(st, s):
	if len(s) == 0:
		return
	if s not in st:
		st.add(s)
		for i in range(len(s)):
			t = list(s).copy()
			t.remove(s[i])
			t = ''.join(t)
			generate(st, t)
	return

def largestincreasingsubsequence(A):
	l = [1] * len(A)
	sub = []
	for i in range(1, len(l)):
		for k in range(i):
			if A[k] < A[i]:
				sub.append(l[k])
		l[i] = 1 + max(sub, default=0)
	return max(l, default=0)

def findOR(nums, N):
	prefix_sum = 0
	result = 0
	for i in range(N):
		result |= nums[i]
		prefix_sum += nums[i]
		result |= prefix_sum
	return result

def OR(a, n):
	ans = a[0]
	for i in range(1, n):
		ans |= a[i]
	return ans

def toString(List):
	return ''.join(List)
p = []

def permute(a, l, r):
	if l == r:
		p.append(toString(a))
	else:
		for i in range(l, r + 1):
			(a[l], a[i]) = (a[i], a[l])
			permute(a, l + 1, r)
			(a[l], a[i]) = (a[i], a[l])

def squareRoot(number, precision):
	start = 0
	(end, ans) = (number, 1)
	while start <= end:
		mid = int((start + end) / 2)
		if mid * mid == number:
			ans = mid
			break
		if mid * mid < number:
			start = mid + 1
		else:
			end = mid - 1
	increment = 0.1
	for i in range(0, precision):
		while ans * ans <= number:
			ans += increment
		ans = ans - increment
		increment = increment / 10
	return ans

def main():
	t = inpu()
	for _ in range(t):
		n = inpu()
		arr = lis()
		arr.sort(reverse=True)
		print(*arr)
main()


from sys import stdin, stdout
int_in = lambda : int(stdin.readline())
arr_in = lambda : [int(x) for x in stdin.readline().split()]
mat_in = lambda rows: [arr_in() for y in range(rows)]
str_in = lambda : stdin.readline().strip()
out = lambda o: stdout.write('{}\n'.format(o))
arr_out = lambda o: out(' '.join(map(str, o)))
bool_out = lambda o: out('YES' if o else 'NO')

def solve(n, a):
	a.sort(reverse=True)
	return a
for i in range(int_in()):
	n = int_in()
	a = arr_in()
	arr_out(solve(n, a))


T = int(input())
for _ in range(T):
	n = int(input())
	A = list(map(int, input().split()))
	A.sort(reverse=True)
	for i in range(n - 1):
		print(A[i], end=' ')
	print(A[n - 1])


from math import gcd
for n in range(int(input())):
	a = int(input())
	s = sorted(list(map(int, input().split())))
	s.reverse()
	print(*s)


def main():
	n = int(input())
	for i in range(n):
		a = int(input())
		b = [int(i) for i in input().split()]
		print(' '.join([str(i) for i in reversed(sorted(b))]))
main()


n = int(input())
while n > 0:
	n -= 1
	tmp = int(input())
	L = []
	L = list(map(int, input().split()))
	L.sort(reverse=True)
	print(' '.join(map(str, L)))


from math import *
from collections import *
from operator import itemgetter
import bisect
ii = lambda : int(input())
iia = lambda : list(map(int, input().split()))
isa = lambda : list(input().split())
I = lambda : list(map(int, input().split()))
chrIdx = lambda x: ord(x) - 96
idxChr = lambda x: chr(96 + x)
t = ii()
for i in range(t):
	n = ii()
	a = iia()
	a.sort()
	a = a[::-1]
	print(*a)


import math, sys
from collections import defaultdict, Counter, deque
INF = float('inf')
MOD = 1000000007

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def isPrime(n):
	if n <= 1:
		return False
	i = 2
	while i ** 2 <= n:
		if n % i == 0:
			return False
		i += 1
	return True

def primeFactors(n):
	factors = []
	i = 2
	while i ** 2 <= n:
		while n % i == 0:
			factors.append(i)
			n //= i
		i += 1
	if n > 1:
		factors.append(n)
	return factors

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

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

def main():
	n = int(input())
	arr = array()
	arr = sorted(arr, reverse=True)
	print(*arr)
t = int(input())
for _ in range(t):
	main()


import sys
input = sys.stdin.readline

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

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

def primefs(n):
	primes = {}
	while n % 2 == 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

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

def find(x, link):
	while x != link[x]:
		x = link[x]
	return x

def union(x, y, size, link):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().split()))
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
for _ in range(int(input())):
	n = int(input())
	a = int_array()
	ans = sorted(a, reverse=True)
	print(*ans)


t = int(input())
for _ in range(t):
	n = int(input())
	li = list(map(int, input().split()))
	li.sort(reverse=True)
	ans = ' '.join([str(v) for v in li])
	print(ans)


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def gift():
	for _ in range(t):
		n = int(input())
		array = list(map(int, input().split()))
		array.sort(reverse=True)
		yield ' '.join((str(x) for x in array))
t = int(input())
ans = gift()
print(*ans, sep='\n')


for x in [0] * int(input()):
	input()
	a = list(map(int, input().split()))
	a.sort()
	print(*a[::-1])


from sys import stdin
input()
for (_, arr) in zip(*[iter(stdin)] * 2):
	print(' '.join(sorted(arr.split(), key=lambda x: -int(x))))


from __future__ import division, print_function
import os, 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

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()
import sys
input = sys.stdin.readline
scanner = lambda : int(input())
string = lambda : input().rstrip()
get_list = lambda : list(read())
read = lambda : map(int, input().split())
get_float = lambda : map(float, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

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

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

def is_integer(n):
	return math.ceil(n) == math.floor(n)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

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

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

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

def next_prime(n, primes):
	while primes[n] != True:
		n += 1
	return n
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

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

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(moves, n):
	val = (moves + 1) // 2
	rem = moves - val
	sol = (val + 1) * (rem + 1)
	return sol < n

def sortSecond(val):
	return val[1]
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
alphs = 'abcdefghijklmnopqrstuvwxyz'
from itertools import permutations
import math
import bisect as bis
import random
import sys
import collections as collect
import functools as fnt
from decimal import Decimal

def solve():
	n = scanner()
	a = get_list()
	a.sort(reverse=True)
	print(*a)
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')
t = scanner()
for i in range(t):
	solve()


for i in range(int(input())):
	n = int(input())
	a = [int(j) for j in input().split()]
	a.sort(reverse=True)
	print(*a)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	w = sorted(map(int, input().split()), reverse=True)
	for i in range(n - 1):
		if w[i] - (i + 1) == w[i + 1] - (i + 2):
			(w[i], w[i + 1]) = (w[i + 1], w[i])
	print(*w)


import math
for _ in range(int(input())):
	n = int(input())
	list1 = list(map(int, input().split()))
	list1.sort(reverse=True)
	print(*list1)


q = int(input())
for ii in range(q):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	print(*a)


t = int(input())
for T in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	n = len(a)
	a.sort(reverse=True)
	print(*a)


t = int(input())
for i in range(t):
	n = int(input())
	mass = [int(x) for x in input().split()]
	mass.sort()
	print(*mass[::-1])


import math

def main():
	numOfTest = int(input())
	for i in range(numOfTest):
		n = int(input())
		a = input().split(' ')
		a = list(map(int, a))
		a = sorted(a, reverse=True)
		a = [str(a[i]) for i in range(n)]
		print(' '.join(a))
main()


from collections import defaultdict as dd
t = int(input())
while t:
	n = int(input())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	print(*l)
	t -= 1


n = int(input())
l = []
for _ in range(n):
	_ = input()
	x = [int(i) for i in input().split()]
	l.append(x)
for s in l:
	s.sort(reverse=True)
	print(*s)


n = int(input())
for i in range(n):
	x = int(input())
	s = list(map(int, input().split()))
	s.sort()
	s.reverse()
	print(*s)


for _ in range(int(input())):
	n = int(input())
	l = [*map(int, input().split())]
	print(*sorted(l, reverse=True))


n = int(input())
for i in range(n):
	m = int(input())
	a = [int(i) for i in input().split()]
	print(*sorted(a)[::-1])


from sys import stdin, stdout
import math
import heapq
t = 1

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

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

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

def main():
	n = aint()
	l = lint()
	l.sort()
	l = l[::-1]
	print(*l)
t = int(input())
for i in range(t):
	main()


t = int(input())
for _ in range(t):
	n = int(input())
	arr = sorted([int(x) for x in input().split()], reverse=True)
	print(' '.join([str(i) for i in arr]))


t = int(input())
for _ in range(t):
	input()
	a = sorted(map(int, input().split()), reverse=True)
	print(*a)


import sys
input = sys.stdin.readline
t = int(input())

def key(x):
	return x[1] - x[0]
for _ in range(t):
	n = int(input())
	x = [*map(int, input().split())]
	x.sort(reverse=True)
	print(*x)


from sys import stdin
from queue import deque
from collections import defaultdict

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

def read_int():
	return int(input())

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

def read_str_list():
	return list(input().split())
for _ in range(read_int()):
	n = read_int()
	arr = read_list()
	arr.sort(reverse=True)
	print(*arr)


def True_Array(len_arr, array):
	for i in range(len_arr - 1):
		for j in range(len_arr - 1 - i):
			if array[j] < array[j + 1]:
				buff = array[j]
				array[j] = array[j + 1]
				array[j + 1] = buff
	return array
count_arr = int(input())
for k in range(count_arr):
	len_arr = int(input())
	array = list(map(int, input().split()))
	print(*True_Array(len_arr, array))


from math import *

def binarySearch(arr, x, i):
	l = i
	r = len(arr) - 1
	while l <= r:
		mid = (l + r) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def js(arr, x):
	l = 0
	r = len(arr) - 1
	ans = -1
	while l <= r:
		m = (l + r) // 2
		if arr[m] <= x:
			ans = m
			l = m + 1
		else:
			r = m - 1
	return ans

def jg(arr, x):
	l = 0
	r = len(arr) - 1
	ans = -1
	while l <= r:
		m = (l + r) // 2
		if arr[m] >= x:
			ans = m
			r = m - 1
		else:
			l = m + 1
	return ans
for __ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort(reverse=True)
	print(*ar)


import sys
input = sys.stdin.readline
from collections import *
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	print(*a)


from collections import deque
from collections import Counter
from itertools import permutations
import heapq

def counterExample():
	arr = [1, 3, 4, 1, 2, 1, 1, 3, 4, 3, 5, 1, 2, 5, 3, 4, 5]
	counter = Counter(arr)
	top_three = counter.most_common(3)
	print(top_three)
q = deque()

def main():
	t = int(input())
	while t >= 1:
		t -= 1
		n = int(input())
		array = [int(i) for i in input().split()]
		a = sorted(array, reverse=True)
		print(' '.join([str(i) for i in a]))
main()


for _ in range(int(input())):
	n = int(input())
	array = list(sorted(map(int, input().split())))[::-1]
	print(*array)


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l1 = l.copy()
	l.sort()
	l.reverse()
	for j in range(len(l)):
		if j == len(l) - 1:
			print(l[j])
		else:
			print(l[j], end=' ')


import os
import sys
from io import BytesIO, IOBase

def iin():
	return int(input())

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

def main():
	T = iin()
	while T:
		T -= 1
		n = iin()
		a = lin()
		a.sort(reverse=True)
		print(*a)
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')
main()


t = int(input())
for T in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort(reverse=True)
	print(*a)


for _ in range(int(input())):
	n = int(input())
	nums = list(map(int, input().split()))
	nums.sort(reverse=True)
	print(*nums, sep=' ')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	print(' '.join(map(str, a)))


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	str1 = ' '.join((str(e) for e in l))
	print(str1)


from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
	return int(input())

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

def solve():
	n = ri()
	A = rl()
	print(*sorted(A, reverse=True))
mode = 'T'
if mode == 'T':
	t = ri()
	for i in range(t):
		solve()
else:
	solve()


n = int(input())
for i in range(n):
	m = int(input())
	a = list(map(int, input().split()))
	a.sort()
	a.reverse()
	print(*a)


R = lambda : map(int, input().split())
t = int(input())
for _ in range(t):
	n = R()
	a = list(R())
	ans = sorted(a, reverse=True)
	print(*ans)