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