N=int(input()) for i in range(N): K,*L=map(int,input().split()) p=sorted(L)[::-1] print(' '.join(str(n) for n in p))