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