N=int(input()) for i in range(N): X=list(map(int,input().split())) print(*sorted(X[1:],reverse=True))