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